Page 1 of 1

Trouble with mogrify

Posted: 2010-05-04T11:13:44-07:00
by mcspencer
I'm trying to set up a script that will convert some EPS images to JPGs. The convert command works perfectly and gives me exactly what I want while the mogrify command severely degrades the image. I'm using the same set of commands and have tried to add a few different things to the mogrify command (-compression & -depth) but to no avail.

Here are the commands:

convert test.eps -resize 1500x1500 -gravity center -extent 1500x1500 -colorspace RGB destination/test.jpg

mogrify -resize 1500x1500 -gravity center -extent 1500x1500 -colorspace RGB -format jpg test.eps


And here is what I end up with:

Convert:
Image

Mogrify:
Image

Does anyone know what is causing the images to be so different and how to correct it?

Thanks!

Re: Trouble with mogrify

Posted: 2010-05-04T11:36:14-07:00
by fmw42
your images don't look all that differenct. but try moving -colorspace RGB to the first position in the command line after convert and mogrify. also what version of IM and ghostscript are you using. possibly upgrade if old. also post a link to your input image so others can test or the IM folks can look at it. Does the input have any profiles? Try adding -strip to both commands and see what happens.

Re: Trouble with mogrify

Posted: 2010-05-06T14:43:12-07:00
by Drarakel
Adding "-colorspace RGB" after mogrify will affect ImageMagick AND Ghostscript (which is responsible for reading the EPS files). Ghostscript could use another output device then (and perhaps the 'dUseCIEColor' parameter is changed).
Adding "-colorspace RGB" after convert (and after the input file) will affect only ImageMagick, but not Ghostscript.
If you add this option directly after convert/mogrify (before the input file), you will get your picture #2 (the mogrify result) with both commands - which is probably not your target.
You can add "-verbose" at the start of your command - not sure if it will be useful for you, but this will make you see any changes to the Ghostscript call.
As fmw42 said, a link to an input file would be useful.