eps to jpg degradations

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
Sonyk
Posts: 7
Joined: 2015-04-02T12:45:05-07:00
Authentication code: 6789

eps to jpg degradations

Post by Sonyk »

Hello, guys. When converting from EPS in jpg edges become blurred. What settings need to change to make the edges as in the EPS (original)
Image
should be something like the picture on the left
Image

original file EPS http://rghost.ru/75mjRSnzB
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: eps to jpg degradations

Post by fmw42 »

JPG is a lossy compression and does a lousy job in flat color regions. You would be better off with these type images going to PNG8 or GIF most likely.

You also do not say what version of Imagemagick and platform you are using and what versions of Ghostscript and libjpeg. You might want to upgrade any or all of them.
Sonyk
Posts: 7
Joined: 2015-04-02T12:45:05-07:00
Authentication code: 6789

Re: eps to jpg degradations

Post by Sonyk »

fmw42 wrote:JPG is a lossy compression and does a lousy job in flat color regions. You would be better off with these type images going to PNG8 or GIF most likely.

You also do not say what version of Imagemagick and platform you are using and what versions of Ghostscript and libjpeg. You might want to upgrade any or all of them.
Version: ImageMagick 6.9.0-10 Q8 x64
Version: gs916w64

C:\Users\Sonyk>convert -resize "5000x5000" -colorspace RGB -quality 100 86d1e.eps 2.jpg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: eps to jpg degradations

Post by fmw42 »

convert -resize "5000x5000" -colorspace RGB -quality 100 86d1e.eps 2.jpg
Correct syntax is to put the input image after convert, though it may not make a difference in IM 6.

Also why are you converting to -colorspace RGB rather than -colorspace sRGB?

You do not say what version of libjpeg you are using?

See the listing from

convert -list format

Mine shows:

JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (90)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format (90)


If you EPS is CMYK then the command should be

Code: Select all

convert -colorspace sRGB 86d1e.eps -resize "5000x5000" -quality 100 2.jpg
if the EPS is sRGB already (RGB), then just do

Code: Select all

convert 86d1e.eps -resize "5000x5000" -quality 100 2.jpg

But I still think you should not use JPG for such images.

Also see http://www.imagemagick.org/Usage/basics/#why
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: eps to jpg degradations

Post by snibgo »

As Fred says, don't use JPG.

Also, don't rasterize it then resize it. Instead, use "-density" to rasterize directly at the required size.

Code: Select all

convert -density 360 86d1e.eps x.png
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: eps to jpg degradations

Post by fmw42 »

I forgot to add that you might get better color fidelity using profiles rather than -colorspace
Sonyk
Posts: 7
Joined: 2015-04-02T12:45:05-07:00
Authentication code: 6789

Re: eps to jpg degradations

Post by Sonyk »

Thanks for the help guys.
snibgo, How do you calculate the value of 360?
Sonyk
Posts: 7
Joined: 2015-04-02T12:45:05-07:00
Authentication code: 6789

Re: eps to jpg degradations

Post by Sonyk »

magick value 72...
72*5 = 360
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: eps to jpg degradations

Post by snibgo »

Yes, that's it. The default density is 72. This creates a width of 1000. But you want a width of 5000. 72*5000/1000 = 360.
snibgo's IM pages: im.snibgo.com
Post Reply