Color conversion for heic image does not work #6716
Replies: 4 comments
-
ImageMagick requires the libheif delegate library to read / write the HEIC image format. The delegate library supports reading and writing EXIF and XMP profiles, however, currently ImageMagick only supports reading EXIF. It does not write EXIF, ICC, or XMP profiles. ImageMagick is open-source. Consider posting a Git pull request to add this functionality to ImageMagick's HEIC coder, coders/heic.c. |
Beta Was this translation helpful? Give feedback.
-
A quick note to anyone who is trying to fix this: I looked into doing this but in coders/heic.c WriteHEICImage method, there's a color space transformation to YCbCr (status=TransformImageColorspace(image,YCbCrColorspace,exception)) before encoding the heic image. That color space transformation step would also remove the embedded color profile in ImageMagick's Image (since it's now in YCbCr). So fixing this may need a bit more thought here. |
Beta Was this translation helpful? Give feedback.
-
Find below some sample image : original file: heic_converted_to_jpg_with_7_0_7_23_keeping_icc_profile heic_converted_to_jpg_with_7_0_8_44_no_icc_profile_found (red color is washed) heic_converted_to_jpg_with_7_0_7_23_replacing_icc_profile_to_sRGB_profile_via_MagickProfileImage to convert to sRGB under 7_0_7_23 (7_0_8_44 is not working because of #1567) the only way I found is to first call MagickTransformImageColorspace(..sRGBColorspace..) and them MagickProfileImage(..sRGBICCProfile...). |
Beta Was this translation helpful? Give feedback.
-
I too am encountering colorspace related problems when converting HEIC images and using the Steps to reproduce: Assets: Expected output: Colors in out.jpg should closely match those in IMG_6476.HEIC ImageMagick version: Version: ImageMagick 7.0.9-2 Q16 x86_64 2019-10-31 |
Beta Was this translation helpful? Give feedback.
-
Prerequisites
Description
Color conversion for heic image does not work (this works for JPEG). One way to tell is that the target color profile does not get embedded in the output image.
Steps to Reproduce
files.zip
convert heic-no-embedded-profile.heic -profile P3.icc output-should-have-embedded-p3-profile.heic
asuwedi-mbp:Downloads Ari$ exiftool output-should-have-embedded-p3-profile.heic | grep -i profile
File Name : output-should-have-embedded-p3-profile.heic
asuwedi-mbp:Downloads Ari$
System Configuration
Beta Was this translation helpful? Give feedback.
All reactions