EPS conversion color issues

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mike151
Posts: 3
Joined: 2013-01-09T07:30:03-07:00
Authentication code: 6789

EPS conversion color issues

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: EPS conversion color issues

Post by fmw42 »

try

convert -colorspace rgb original.eps convert.png

png does not support cmyk
mike151
Posts: 3
Joined: 2013-01-09T07:30:03-07:00
Authentication code: 6789

Re: EPS conversion color issues

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: EPS conversion color issues

Post 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.
snibgo's IM pages: im.snibgo.com
mike151
Posts: 3
Joined: 2013-01-09T07:30:03-07:00
Authentication code: 6789

Re: EPS conversion color issues

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: EPS conversion color issues

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
hgehlhausen
Posts: 1
Joined: 2015-05-22T11:53:58-07:00
Authentication code: 6789

Re: EPS conversion color issues

Post 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
Post Reply