converting a png with an ICC profile?

Posted by jedierikb on Super User See other posts from Super User or by jedierikb
Published on 2012-12-13T21:26:03Z Indexed on 2012/12/13 23:07 UTC
Read the original article Hit count: 317

Filed under:
|
|

I can convert a jpg from one ICC to another ICC.

convert rgb_image.jpg -profile USCoat.icm cmyk_image.jpg

Or I can convert a jpg with no ICC to another ICC.

convert rgb_image.jpg +profile icm \
-profile sRGB.icc -profile USCoat.icm cmyk_image.jpg

But how do I convert a png's pixels into the gamut described by an ICC profile? I understand I cannot embed the profile into the image file, but would at least like to convert the colors.

When I reuse the above commands, the colors come out wrong... (different from the colors in the JPG when converted).


This is the source image: http://alumni.media.mit.edu/~erikb/tmp/RED_JPG.jpg

And here is what I am trying:

convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_PNG.png

and this is what I am getting: http://alumni.media.mit.edu/~erikb/tmp/CMYK_PNG.png

I was hoping to get an image with the same colors as a JPEG run through the same command:

convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_JPG.jpg

resulting in: http://alumni.media.mit.edu/~erikb/tmp/CMYK_JPG.jpg

*this image, CMYK_JPG.jpg, is what I am trying to reproduce pixel by pixel in a PNG file.*


Any suggestions? Original (unanswered) post here.

© Super User or respective owner

Related posts about images

Related posts about conversion