Convert HEIF (.heic) to JPEG on a server?

Christian picture Christian · Aug 2, 2017 · Viewed 42.1k times · Source

Apple has introduced a new image format in iOS 11 called HEIF (.heic file extension). I know you can export images as JPG from iOS devices, but I want to upload the HEIC-files to my server and convert them there to JPEG files that can be shown on all other devices.

Can anyone recommend a good and efficient way to achieve this?

ANSWER:

Since this question has been closed, I will edit in my answer here for the rest of you. We now use this library for converting HEIC to JPEG: https://github.com/monostream/tifig

Also ImageMagick now support converting HEIC to JPEG thanks to a fork from @toshic

Thank you to @monostream and @toshic for your great contributions!

EDIT1: Edited the wording of the question to be more specific and meet SO guidelines

EDIT2: Added answer since this topic is now closed :/

Answer

Eric Jensen picture Eric Jensen · Sep 13, 2017

It's complicated because iOS 11 is actually storing tiles of HEVC encoded images in a HEIF container, but there's a demo using the nokia lib to extract them all, ffmpeg to decode them and then stitching them into a single jpeg with imagemagick in the heiftest repo linked from corrupted HEIC tile when converting to JPEG

We also have a working one you can use by cloning https://github.com/pushd/heif and then:

cmake CMakeLists.txt && make && Bins/heiftojpeg test_001.heic test_001.jpg