Skip to content

Commit

Permalink
Reformat README
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Reinhard committed Jan 22, 2018
1 parent 08baa17 commit b99af76
Showing 1 changed file with 42 additions and 48 deletions.
90 changes: 42 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Converts HEIF images created on iOS 11 devices as fast as ~~humanly~~ possible

[![Build Status](https://travis-ci.org/monostream/tifig.svg?branch=master)](https://travis-ci.org/monostream/tifig)


## Build Dependencies

* `libvips` >= 8.6
Expand All @@ -16,88 +17,81 @@ Converts HEIF images created on iOS 11 devices as fast as ~~humanly~~ possible

This one-liner should get you going:

```
# brew install vips ffmpeg
```
brew install vips ffmpeg


#### Linux

First of all, to just try out tifig, the easiest way is to [use one of our static builds](https://github.com/monostream/tifig/releases).
First of all, to just try out tifig, the easiest way is to [use our static builds](https://github.com/monostream/tifig/releases).

However, if you do want to build from source, verify carefully that the minimally required versions are actually shipped and installed with your distro and release.

For ffmpeg, check the output of:

```
ffmpeg -version
```
ffmpeg -version

Assuming you are using a ubuntu based system, this should help if your versions of 'libavcodec' and 'libswscale' is too old:

```
# sudo add-apt-repository -y ppa:jonathonf/ffmpeg-3
# suod apt-get update
# sudo apt-get install libavcodec-dev libswscale-dev
```
sudo add-apt-repository -y ppa:jonathonf/ffmpeg-3
sudo apt-get update
sudo apt-get install libavcodec-dev libswscale-dev

Since tifig requires quite a modern version of `libvips`, building from source is probably required. [Follow the instructions here](http://jcupitt.github.io/libvips/install.html#building-libvips-from-a-source-tarball) .

Again on ubuntu, something like this should do the trick:

```
sudo apt-get install build-essential pkg-config libglib2.0-dev libexpat1-dev libjpeg-dev libexif-dev libpng-dev libtiff-dev
wget https://github.com/jcupitt/libvips/releases/download/v8.6.1/vips-8.6.1.tar.gz
tar xzf vips-8.6.1.tar.gz
cd vips-8.6.1
./configure
make
sudo make install
```
sudo apt-get install build-essential pkg-config libglib2.0-dev libexpat1-dev libjpeg-dev libexif-dev libpng-dev libtiff-dev
wget https://github.com/jcupitt/libvips/releases/download/v8.6.1/vips-8.6.1.tar.gz
tar xzf vips-8.6.1.tar.gz
cd vips-8.6.1
./configure
make
sudo make install


## Build

```
git clone --recursive https://github.com/monostream/tifig.git
mkdir tifig/build && cd tifig/build
cmake ..
make
```
git clone --recursive https://github.com/monostream/tifig.git
mkdir tifig/build && cd tifig/build
cmake ..
make


## Usage

Convert the fullsize picture:
```
# tifig -v -p image.heic output.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 97ms
Saving image: 55ms
Total Time: 160ms
```

# tifig -v -p image.heic output.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 97ms
Saving image: 55ms
Total Time: 160ms

Create a thumbnail with max width of 800px:
```
# tifig -v -p --width 800 image.heic thumbnail.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 113ms
Saving image: 100ms
Total Time: 243ms
```

# tifig -v -p --width 800 image.heic thumbnail.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 113ms
Saving image: 100ms
Total Time: 243ms


Create a cropped thumbnail to match size exactly:
```
# tifig -v -p --crop --width 400 --height 400 1_portrait.heic thumbnail.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 105ms
Saving image: 125ms
Total Time: 234ms
```

# tifig -v -p --crop --width 400 --height 400 1_portrait.heic thumbnail.jpg
Grid is 4032x3024 pixels in tiles 8x6
Export & decode HEVC: 105ms
Saving image: 125ms
Total Time: 234ms

When a size smaller or equal to 240x240 is requested, tifig will automatically use the embedded thumbnail.


## Installing

We release tifig as static x86_64 binary that should work on any linux without installing dependencies. The only requirement is glibc with a minimal version of 2.14. Just copy the binary to `/usr/local/bin` or wherever you want to.


## ToDo's

* ~~Testing~~
Expand Down

0 comments on commit b99af76

Please sign in to comment.