CMYK to sRGB with profiles loses transparency

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

CMYK to sRGB with profiles loses transparency

Post by fmw42 »

Using IM 6.9.9.34 Mac OSX Sierra.

Input:
http://www.fmwconcepts.com/misc_test/ai ... ug/test.ai

This works fine:

Code: Select all

convert -density 150 -background none -colorspace srgb test.ai test1.png
http://www.fmwconcepts.com/misc_test/ai ... /test1.png

But this loses transparency:

Code: Select all

convert -density 150 -background none test.ai \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
test2.png
http://www.fmwconcepts.com/misc_test/ai ... /test2.png
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK to sRGB with profiles loses transparency

Post by magick »

ImageMagick relies on Ghostscript to interpret PS / EPS / PDF / AI. Unfortunately, Ghostscript does not provide a device that supports CMYKA. We use the pamcmyk32 device. The format does support CMYKA but currently the device does not write the alpha channel. Perhaps more modern releases of Ghostscript does. If so, problem solved.

Here is the header from the pamcmyk32 device. Notice its missing the alpha component:

Code: Select all

P7
WIDTH 595
HEIGHT 595
DEPTH 4
MAXVAL 255
TUPLTYPE CMYK
# Image generated by GPL Ghostscript
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK to sRGB with profiles loses transparency

Post by fmw42 »

Thanks. I understand.
Post Reply