Page 1 of 1

EPS conversion color issues

Posted: 2013-01-09T08:05:14-07:00
by mike151
Hello,
I was hoping to get some assistance with an intermediate ImageMagick issue I'm encountering.
I have IM working well processing hundreds of EPS files, converting them to various sized PNG formats. For 98% of the files, the process works great. But I've run into a number of EPS files that when converted, the colors shift. I assume this has to do with color profiles or colorspaces, but I've tinkered with RGB/CMYK settings and nothing I do seems to help.

Here's an example:
Original EPS file: http://dl.dropbox.com/u/17139059/original.eps
What it looks like on screen (correct colors): http://dl.dropbox.com/u/17139059/origin ... n_shot.png

Code: Select all

convert original.eps convert.png
Gives this: http://dl.dropbox.com/u/17139059/convert.png
(The green is much brighter)

I've tried things like:

Code: Select all

convert -colorspace cmyk original.eps -colorspace rgb convert.png
convert -colorspace cmyk original.eps convert.png
My biggest issue will be to figure out how to handle these few color conversion issues without messing up the 98% that work correctly.

Any suggestions or a point in the right direction would be appreciated!

-Mike

Re: EPS conversion color issues

Posted: 2013-01-09T12:27:31-07:00
by fmw42
try

convert -colorspace rgb original.eps convert.png

png does not support cmyk

Re: EPS conversion color issues

Posted: 2013-01-09T15:48:47-07:00
by mike151
Thanks for the quick reply Fred.

I tried what you suggested, and all it seemed to do was include a transparent background on the result png. The color is still the same (incorrect).

It's interesting because when the EPS file is loaded into Photoshop, the colors are correct. When I load it in Gimp, the colors are off, the same as IM.
So I'm assuming it's the CMYK to RGB conversion that's doing it. I've read enough to know that CMYK -> RGB is "bad", but I'm not quite sure what to do about it. :/

Thanks in advance for any other suggestions

Re: EPS conversion color issues

Posted: 2013-01-09T16:10:51-07:00
by snibgo
From "identify -verbose", I see that original.eps contains Photoshop spotcolors. As I understand it, these are separate layers for plates that are inked up with fixed colours that need not be representable in CMYK or RGB. I don't know if IM takes any notice of these.

Your best bet might be to convert such files with Photoshop.

Re: EPS conversion color issues

Posted: 2013-01-11T11:01:57-07:00
by mike151
I think you hit it spot on with the spot colors. I compared to other EPS files that convert reliably and the ones with the SpotColors are the ones having the issue.

It makes sense that IM doesn't handle these... I'll work on another solution.

Thanks soooo much for helping with this issue!


-Mike

Re: EPS conversion color issues

Posted: 2013-01-20T21:57:59-07:00
by anthony
I think problems with CMYK conversion is generally to do with CMYK supposedally being the negative of linear-RGB however many people treat it as being the negative of non-linear sRGB.

In other words result is either too light or too dark in midtone colors.

Re: EPS conversion color issues

Posted: 2015-05-22T11:57:20-07:00
by hgehlhausen
I found that this issue seems only partially correct.

The solution I found for my colors being wrong was to have ghostscripts installed, and to define the colorspace as sRGB ( instead of RGB )

command :

Code: Select all

convert -colorspace sRGB original.eps converted.png