Convert HEIF (.heic) to JPEG on a server?
IosImagemagickJpegHevcHeifIos Problem Overview
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 :/
Ios Solutions
Solution 1 - Ios
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 https://stackoverflow.com/questions/45485622/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
Solution 2 - Ios
There is no such library available right now for image conversion on a server for HEIF to JPEG, ImageMagick doesn't have support for that till now.
The only way you can do this by exporting your images from your device, that should produce a JPEG image.
Nokia has a HEIF reader javascript implementation which you can have a look at: Nokiatech heif
Alternate: You can try this website if this works.