Page 1 of 1

Colour changes when converting from EPS to PNG

Posted: 2014-03-20T11:34:37-07:00
by SCHOLARGraeme
Hi,

I am using the following command to convert an EPS image to a 24-bit PNG:

Code: Select all

convert Colours.eps PNG24:Colours.png
As you can see from the image below it doesn't replicate the colours exactly, with the original EPS appearing on the left and the ImageMagick conversion on the right:
Image

The original EPS file can be downloaded here:
https://www.dropbox.com/s/p2r2zdow1lqb4fw/Colours.eps

Any idea if I am using ImageMagick wrong or if this is a bug?

I am using ImageMagick 6.8.8-9 Q16 x64 2014-03-16 on Windows 7

Thanks

Re: Colour changes when converting from EPS to PNG

Posted: 2014-03-20T11:55:15-07:00
by fmw42
Your image is cmyk EPS (according to identify -verbose Colours.eps) and needs to be converted to sRGB. PNG does not support cmyk. It also results in missing colors that seem to be represented as transparency (see snibgo's comments below), so you may want to flatten against a white background. You may also want to set the density before reading the eps so that the output will be the desired resolution. I do not see much difference using profiles vs -colorspace.

Code: Select all

convert [-density XX] -colorspace sRGB Colours.eps PNG32:Colours1.png

Code: Select all

convert [-density XX] -colorspace sRGB Colours.eps -background white -flatten Colours2.png

Code: Select all

convert [-density XX] Colours.eps -profile /Users/fred/images/Profiles/USWebCoatedSWOP.icc -profile /Users/fred/images/Profiles/sRGB.icc -background white -flatten Colours3.png
Brackets on -density just mean that is optional

Re: Colour changes when converting from EPS to PNG

Posted: 2014-03-20T11:58:13-07:00
by snibgo
The missing colours are probably the Photoshop spotcolors that can be seen in "identify -verbose colours.eps". These are colours that use special inks that may not be reproducible with RGB or CMYK.

Re: Colour changes when converting from EPS to PNG

Posted: 2014-03-20T12:03:20-07:00
by fmw42
snibgo wrote:The missing colours are probably the Photoshop spotcolors that can be seen in "identify -verbose colours.eps". These are colours that use special inks that may not be reproducible with RGB or CMYK.
You are right. I missed that. The transparency may be coming from those missing spot colors. Odd that IM would use transparency for that. No actual transparency shows in the verbose info. That is, the file is CMYK and not CMYKA.

Re: Colour changes when converting from EPS to PNG

Posted: 2014-03-20T12:12:24-07:00
by SCHOLARGraeme
Thank you fmw42 and snibgo and for the information about those spot colours.

The following command gets the conversion I am looking for:

Code: Select all

convert [-density XX] -colorspace sRGB Colours.eps PNG32:Colours1.png
Thank again.