Page 1 of 1

How to get exact color values from EPS files...

Posted: 2015-07-28T23:37:51-07:00
by ananthakumarj
Hi All,

This is my first post in this forum.

How can i get the color information (CMYK, RGB, Black & White) from EPS image file. I am not added any xmp or meta information in image file. Is this possible to get these details in "perl" or "IM".

Thanks in Advance..

Regards,
Kumar J.

Re: How to get exact color values from EPS files...

Posted: 2015-07-28T23:43:21-07:00
by fmw42
see %[colorspace] at http://www.imagemagick.org/script/escape.php

Code: Select all

convert image.eps -format "%{colorspace]" info:
or just extract it from

Code: Select all

identify -verbose image.eps

Re: How to get exact color values from EPS files...

Posted: 2015-07-29T01:29:18-07:00
by ananthakumarj
Hi Thanks for reply,

I am used this commands,
"identify -verbose image_cmyk.eps"
"identify -verbose image_rgb.eps" but in both outputs, "Colorspace" provides the value "CMYK".

Image files are created in Adobe Illustrator.

Regards,
Kumar J

Re: How to get exact color values from EPS files...

Posted: 2015-07-29T07:12:34-07:00
by 246246
ananthakumarj wrote:Hi Thanks for reply,

I am used this commands,
"identify -verbose image_cmyk.eps"
"identify -verbose image_rgb.eps" but in both outputs, "Colorspace" provides the value "CMYK".

Image files are created in Adobe Illustrator.
I think ImageMagick only read the %%DocumentProcessColors: comment on the head of EPS file to determine colorspace.

I guess your image_rgb.eps has

%%DocumentProcessColors: Cyan Magenta Yellow Black

line on the head of the document. See also https://forums.adobe.com/thread/812746?tstart=0

So I think the real question is whether your file is properly converted to RGB.
If it is your concern, to ask adobe is better, however, if you upload your file, someone here could investigate.
(As I am not using Illustrator, and it might also depends its version, I cannot help more. Quick google search leads me the following: http://blog.brandisty.com/here-s-how-to ... lustrator/ )

In general case, EPS can contain both RGB & CMYK object at the same time. For example, I believe the following is valid EPS.

Code: Select all

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 500 300
%%Extensions: CMYK
%%LanguageLevel: 2
%%Pages: 0
%%EndComments
newpath
300 100 moveto 
100 0 rlineto
0 100 rlineto
-100 0 rlineto
closepath
gsave
1 .7 0 0 setcmykcolor
fill
grestore
0 .3 1 0 setcmykcolor
10 setlinewidth
stroke

newpath
100 100 moveto 
100 0 rlineto
0 100 rlineto
-100 0 rlineto
closepath
gsave
1 1 .5 setrgbcolor
fill
grestore
.5 1 0 setrgbcolor
10 setlinewidth
stroke

%%EOF
So no one can determine whether EPS file is RGB or CMYK. ImageMagick treat it as RGB and handle this with gs "-sDEVICE=pngalpha" accoding to delegate.xml settings.

Re: How to get exact color values from EPS files...

Posted: 2015-07-29T09:26:15-07:00
by fmw42
Are you converting the CMYK eps to RGB? Or do you have two totally different and unrelated eps files? A proper conversion of the CMYK file to sRGB should report sRGB by IM, I would think. If you are converting, the post your command line for doing that.