Page 1 of 1

CMYK to sRGB with profiles loses transparency

Posted: 2018-01-30T13:49:36-07:00
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

Re: CMYK to sRGB with profiles loses transparency

Posted: 2018-01-31T09:27:11-07:00
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

Re: CMYK to sRGB with profiles loses transparency

Posted: 2018-01-31T09:48:19-07:00
by fmw42
Thanks. I understand.