possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Post 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]
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug profiles IM 6.8.6.2 Q16 Mac OSX

Post 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.
Post Reply