converting tif to png with -profile not working

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

converting tif to png with -profile not working

Post by jedierikb »

ImageMagick 6.9.1-8 Q16 x86_64 2015-07-14

input:
http://alumni.media.mit.edu/~erikb/tmp/ ... front2.tif
output:
http://alumni.media.mit.edu/~erikb/tmp/rgb_exp/out2.png

When I run this:

Code: Select all

convert front2.tif -profile sRGB_IEC61966-2-1_black_scaled.icc out2.png

Code: Select all

convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.
The result is in garish colors I did not expect (or want). The same conversion within photoshop is what I expected, as seen here:
http://alumni.media.mit.edu/~erikb/tmp/ ... /pshop.png

What am I doing wrong with ImageMagick?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting tif to png with -profile not working

Post by fmw42 »

Your tiff file is CMYK, but has no CMYK profile. To convert to sRGB when there is not CMYK profile in the input, you need to supply a CMYK profile as well as the sRGB profile. The following works fine for me on IM 6.9.1.8 Q16 Mac OSX

Code: Select all

convert front2.tif \
-profile /Users/fred/images/profiles/USWebCoatedSwop.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
front2.png
Post Reply