HEIF / HEIC image format?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
FrontierDK
Posts: 12
Joined: 2017-05-08T11:12:41-07:00
Authentication code: 1151

HEIF / HEIC image format?

Post by FrontierDK » 2017-09-20T12:37:49-07:00

Hi all :D

I'm guessing some of you have noticed that the new iOS for iPhone 6s/7/7plus/8/X use the new HEIF image format, with the .HEIC extension.

Any chance of an implementation? :D

User avatar
magick
Site Admin
Posts: 10733
Joined: 2003-05-31T11:32:55-07:00

Re: HEIF / HEIC image format?

Post by magick » 2017-09-20T13:36:30-07:00

The only chance of an implementation is likely if an ImageMagick user contributes a reference implementation that works directly with ImageMagick. Another option would be if there was a command-line program to decode and encode the HEIF image format. We could then use the program as a delegate program within ImageMagick for HEIF. The IM developers are unable to support HEIF any time soon, we are already overbooked with pending tasks by multiple orders of magnitude.

User avatar
Vlad the implier
Posts: 5
Joined: 2017-09-21T04:00:51-07:00
Authentication code: 1151

Re: HEIF / HEIC image format?

Post by Vlad the implier » 2017-09-22T05:09:42-07:00

magick wrote:
2017-09-20T13:36:30-07:00
we are already overbooked with pending tasks by multiple orders of magnitude.
Just out of curiosity, is there a roadmap with new features and fixes to look forward to?

User avatar
magick
Site Admin
Posts: 10733
Joined: 2003-05-31T11:32:55-07:00

Re: HEIF / HEIC image format?

Post by magick » 2017-09-22T05:20:53-07:00

No formal roadmap. Informally, we set development priorities based on Fred's (http://www.fmwconcepts.com/imagemagick/) informal list of image processing algorithms that we think would benefit ImageMagick users. However, development has slowed due to the major effort we invested in the last year making ImageMagick more secure and eliminating small memory leaks in our exception branches. That effort seems to be mostly behind us so we probably will get back to developing new vision algorithms. For HEIC, we are waiting for a decent, robust, HEIC API that we can leverage to read / write HEIC. Failing that, we are waiting for a user to contribute code that supports HEIC. HEIC is not something our small development team wants to tackle right now.

AliceWonder
Posts: 12
Joined: 2014-07-09T21:41:34-07:00
Authentication code: 6789

Re: HEIF / HEIC image format?

Post by AliceWonder » 2018-01-04T15:44:15-07:00

I wish I could do what needs to done. ImageMagick is *the* library I use for images, either via the php module or the command line. WebP already significantly reduces bandwidth while maintaining quality for clients that support it (I use the html5 picture tag to provide fallback for clients that don't) but it looks like HEIF compresses photographs as well as WebP if not better, and I suspect will be supported in Safari sooner.

There is the patent issue, seems HEIF has some valid software patents, hopefully that isn't too much of an issue.

User avatar
magick
Site Admin
Posts: 10733
Joined: 2003-05-31T11:32:55-07:00

Re: HEIF / HEIC image format?

Post by magick » 2018-01-05T04:26:10-07:00

A user has contributed a HEIC reader (it does not write in the HEIC format), however, its not part of the ImageMagick distribution yet. We're waiting for clearance from the "lawyers". Until we get that clearance, you can build ImageMagick from source yourself. Grab the ImageMagick source distribution, unpack, and replace coders/heic.c with this module: https://github.com/toshic/ImageMagick/b ... ers/heic.c. Now build and install ImageMagick. You can now read HEIC images. If you find certain HEIC images that cannot be read by this module, contact the author @ https://github.com/toshic/ImageMagick.

FrontierDK
Posts: 12
Joined: 2017-05-08T11:12:41-07:00
Authentication code: 1151

Re: HEIF / HEIC image format?

Post by FrontierDK » 2018-01-07T05:40:11-07:00

Thank you for the good news :D

For someone who hasn't been inside an IDE for many years, what IDE is used to compile the project?

liangyanbin
Posts: 2
Joined: 2018-01-09T02:27:30-07:00
Authentication code: 1152

Re: HEIF / HEIC image format?

Post by liangyanbin » 2018-01-09T02:30:06-07:00

It seems that replace heic.c is not enough.
magick: no decode delegate for this image format `HEIC' @ error/constitute.c/ReadImage/509.

User avatar
magick
Site Admin
Posts: 10733
Joined: 2003-05-31T11:32:55-07:00

Re: HEIF / HEIC image format?

Post by magick » 2018-01-09T04:44:19-07:00

Right. You also need the libde265 library and headers installed on your system. After you install it, go to the ImageMagick source folder and type `configure`. When it completes, review the finals lines of output and ensure HEIC is enabled.

liangyanbin
Posts: 2
Joined: 2018-01-09T02:27:30-07:00
Authentication code: 1152

Re: HEIF / HEIC image format?

Post by liangyanbin » 2018-01-17T00:34:29-07:00

How can I add the libde265 library into the ImageMagick's 'configure' search path?
It seems that the 'configure' did not find the libde265.

User avatar
magick
Site Admin
Posts: 10733
Joined: 2003-05-31T11:32:55-07:00

Re: HEIF / HEIC image format?

Post by magick » 2018-01-17T04:26:58-07:00

It depend on the OS. We develop on a Fedora system. We install libde265 with this command: yum install libde265-devel. After the install, the ImageMagick configure script validates the library and includes support for HEIC in the build.

Post Reply