Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 :/

like image 584
Christian Avatar asked Aug 02 '17 12:08

Christian


People also ask

Can you switch setting in iPhone to change from HEIC to JPG?

In your “Settings” menu, find and tap on “Camera.” In the “Camera” menu, tap on “Formats” at the very top of the menu. Here you can select either “High Efficiency,” which will allow your iPhone to shoot and store HEIC files, or “Most Compatible,” which will have your phone capture JPEGs.

Can HEIF be converted to JPEG?

Select the HEIFs within Preview's sidebar by using your mouse, pressing Command (⌘)-A or choosing the Select All command from the Edit menu. 5) Next, choose Export Selected Images from the File menu. 6) Click Options and select JPEG from the Format menu.


1 Answers

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 
like image 76
Eric Jensen Avatar answered Sep 28 '22 09:09

Eric Jensen