Page 1 of 1

possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Posted: 2013-06-28T09:15:28-07:00
by fmw42
Profile information seems to lost when converting to jpg, though it looks like the profile may be there. This just may be a limitation of the jpg format

# add profile
convert logo: -strip -profile /Users/fred/images/profiles/sRGB.icc logo_profile.tif

# convert to another tif image works fine
convert logo_profile.tif logo_profile2.tif
Profiles:
Profile-icc: 6876 bytes
Description: sRGB built-in
Manufacturer: (lcms internal)
Model: sRGB built-in
Copyright: sRGB built-in


# convert to png works fine
convert logo_profile.tif logo_profile2.png
Profiles:
Profile-icc: 6876 bytes
Description: sRGB built-in
Manufacturer: (lcms internal)
Model: sRGB built-in
Copyright: sRGB built-in



# convert to jpg loses descriptive information about the profile
convert logo_profile.tif logo_profile2.jpg
Profiles:
Profile-icc: 6873 bytes




Does jpg support this other descriptive information?

Re: possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Posted: 2013-06-28T10:06:50-07:00
by snibgo
I think there is a problem with profiles in JPG files. Applying a profile in a PNG is okay, but then doing a round-trip to JPG and back to PNG loses the profile. Demonstration in Windows7, IM v6.8.6-1:

Code: Select all

D:\web\im>%IM%convert logo: -profile snibgoGBR.icc lp.png

D:\web\im>%IM%convert lp.png lp2.jpg

D:\web\im>%IM%convert lp2.jpg lp2.png
convert.exe: Embedded profile length too large in iCCP chunk `lp2.png' @ warning
/png.c/MagickPNGWarningHandler/1830.

identify -verbose lp.png:

Code: Select all

Profiles:
    Profile-icc: 3144 bytes
      Description: RGB becomes GBR
      Manufacturer: IEC http://www.iec.ch
      Model: A space where hue is rotated by 120 degrees
      Copyright: Copyright (c) 2010 Snibgo Applied Arts
lp2.jpg:

Code: Select all

Profiles:
    Profile-icc: 3141 bytes
lp2.png:
[no profile]

Re: possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Posted: 2013-06-28T11:07:55-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.6-3 Beta available by sometime tomorrow. Thanks.