Colors off

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?".
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Colors off

Post by stevenb46 »

any ideas???
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colors off

Post by fmw42 »

As user snibgo said, IM does not know how to handle spot colors. It is not clear what happens to colors in that case. If you want to post your eps file to some place like dropbox.com and put a URL here, perhaps some one can test and verify you claim or explain what is happening.

Note that Photoshop has proprietary software and processing and it may not be possible with any other tool to perfectly reproduce their results.

Did you try processing it on GIMP? Does it handle it properly?
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Colors off

Post by stevenb46 »

My colleague tried GIMP and is getting similar results. I'm not looking for perfection, even Photoshop renders colors slightly off. I'm looking for fairly close.

In IM, when I use -colorspace CMYK to JPG, it looks good, just when I use -colorspace sRGB. I've attached links to a EPS, photoshop jpg, and IM jpg.

https://dl.dropboxusercontent.com/u/220 ... 75-Map.eps (EPS, rendered in Photoshop I believe)

https://dl.dropboxusercontent.com/u/220 ... 8PS%29.jpg (JPG (RGB) rendered in Photoshop)

https://dl.dropboxusercontent.com/u/220 ... 8IM%29.jpg (jpg (RGB) rendered in IM)

I believe IM uses something. as there is a color, colors aren't dropped. If there's no profile to handle this, is there a way to create a substitution table to resolve this.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colors off

Post by fmw42 »

This command works fine for me on IM 6.8.9.7 Q16 Mac OSX and seems to match the colors adequately as per your PS eps and PS jpg. Your eps file has transparency, so I had to flatten it against a white background.

Unix syntax.

Code: Select all

convert -density 1920 -units PixelsPerInch -colorspace sRGB g65f75-Map.eps -resize 5% \
-background white -flatten -quality 100 g65f75-Map_IM_b.jpg
You do not appear to have identified your IM version or platform. There can be several issues.

1) you are using an older version of IM when (non-linear) sRGB and (linear) RGB were swapped. See viewtopic.php?f=4&t=21269

try replacing -colorspace sRGB with -colorspace RGB

2) your delegates.xml file may need to use sDEVICE=pngalpha rather than pnmraw for the ps line.


It might help if you identified your IM version and platform and listed your delegates.xml file.
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Colors off

Post by stevenb46 »

Only thing I can tell that's different from what I was doing was "-background white -flatten" which I didn't do. -flatten seems to do the trick. Before when I tried -colorspace sRGB in front the background turned black. I'm using ImageMagick 6.8.9-4 Q16 x64 2014-06-22 on Win7 machine.

Results are better. Thanks Fred!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colors off

Post by fmw42 »

Check your version of libjpeg and make sure it is not too old. Also check your version of Ghostscript and make sure it is not too old.

My libjpeg is (90)
My Ghostscript is 9.10


Also check your delegates.xml file as I mentioned above for the sDEVICE being used for ps files.

Here is what I have:


<delegate decode="ps:alpha" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>

<delegate decode="ps:cmyk" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>

<delegate decode="ps:color" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pnmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>


Since your eps file shows as having transparency when I processed it, I had to add the -background white -flatten. But that may be because my sDevice is pngalpha. identify -verbose does not show any transparency.

The only other suggestion would be to have some windows user confirm on your version of IM or for you to upgrade. But I would be surprised if your IM version was not adequate. But you never know when a bug gets introduced.
Post Reply