Page 1 of 1

HEIC Exif tags not being saved to JPEG

Posted: 2018-07-22T23:17:41-07:00
by catboli
Hi!

First, thanks so much for ImageMagick!

I'm using ImageMagick to convert from HEIC (iPhone photo) into JPEG. I'm using Ubuntu 16.04 but I compiled ImageMagick myself from git and I also tried ImageMagick-7.0.8-6.

$ git show HEAD
commit 712c8bc4bcb5fa0694f5c169630f3b4b122862c5

I built libexif and compiled ImageMagick like this:
./configure --prefix=/home/catboli/ImageMagick/build --with-libheif --with-jpeg --enable-debug ; make ; make install

Then, I tried using convert:
./convert ~/IMG_0001.heic ~/out.JPG

This works but I don't get any Exif metadata on the output:
./identify -format '%[EXIF:*]' ~/out.JPG
(prints nothing)

But the funny thing is that identify works on the HEIC file itself:

./identify -format '%[EXIF:*]' ~/IMG_0001.HEIC
....
exif:WhiteBalance=0
exif:XResolution=72/1
exif:YCbCrPositioning=1
exif:YResolution=72/1

Using exiftool I'm able to copy the tags from the HEIC into the JPEG but I have to nuke the file metadata with mogrify before:

./mogrify ~/out.JPG
exiftool -TagsFromFile ~/IMG_0001.heic ~/out.JPG

Let me know if there's anything else I could do to help debugging (if it is a bug).

Re: HEIC Exif tags not being saved to JPEG

Posted: 2018-07-23T02:38:03-07:00
by snibgo
catboli wrote:Let me know if there's anything else I could do to help debugging (if it is a bug).
For people who have libheif (I don't) a link to a sample input would help.