Quality of EPS files processed with Image Magick is poor

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
meenal.joshi
Posts: 5
Joined: 2014-05-29T03:32:51-07:00
Authentication code: 6789

Quality of EPS files processed with Image Magick is poor

Post by meenal.joshi »

Hi,

I am facing issue with the quality of EPS files processed with ImageMagick.
ImageMagick version : ImageMagick-6.8.8-Q16
GhostScript version: gs9.14
I am using Windows 7 - 64 bit OS

I am converting EPS file to PDF using ImageMagick. My system uploads EPS as Original file and PDF preview is generated from this EPS file using ImageMagick. My system requires that the preview generated preview file dimension should be in the aspect ratio of 1024x786.

Now when the EPS is of smaller dimensions than 1024x768, then "convert.exe" generates low quality quality or distorted pdf.
Following is the command used for conversion
convert "C:\Originals\TestEPSFile.eps" -resize 1024x768 -density 72 -depth 24 "C:\Previews\TestPDFFile.PDF"

Similar issue is seen when EPS file is cropped to EPS file.
Any suggestions on what went wrong on arguments passed? or How I can resolve this issue?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Quality of EPS files processed with Image Magick is poor

Post by snibgo »

What is in your EPS? If vector data, such as text, then the problem is "-density". 300 may be a better value.

If that doesn't help, put your EPS file somewhere like dropbox.com and paste the link here.
snibgo's IM pages: im.snibgo.com
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Quality of EPS files processed with Image Magick is poor

Post by glennrp »

Depth is the number of bits in a color sample within a pixel. You probably want "-depth 8" instead of "-depth 24", although
the poor appearance of your result is more likely due to too-small "density" as has already been suggested by snibgo.
meenal.joshi
Posts: 5
Joined: 2014-05-29T03:32:51-07:00
Authentication code: 6789

Re: Quality of EPS files processed with Image Magick is poor

Post by meenal.joshi »

Hi,

My EPS contains vector data. I tried with having density 300 as well as keeping depth 8 but nothing worked for me.
I am getting this issue only for EPS having small width, height than 1024x768.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Quality of EPS files processed with Image Magick is poor

Post by fmw42 »

Did you put -density before the input eps? With vector files the density should come before the vector file. Try


convert -density 300 "C:\Originals\TestEPSFile.eps" -resize 1024x768 -depth 8 "C:\Previews\TestPDFFile.PDF"


IM is not the best tool to convert from one vector format (eps) to another (pdf). IM will rasterize you eps and then imbed it into a vector (pdf) shell. See http://www.imagemagick.org/Usage/formats/#vector
valentas
Posts: 1
Joined: 2014-12-26T10:40:14-07:00
Authentication code: 6789

Re: Quality of EPS files processed with Image Magick is poor

Post by valentas »

If you came here looking how to convert eps to pdf on Linux, the correct way is using the command 'pdftops converted.eps source.pdf' rather than using convert or mogrify. As noted in the last comment ImageMagick converts pdf vector graphics to a raster image.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Quality of EPS files processed with Image Magick is poor

Post by snibgo »

pdftops is also available from Cygwin for Windows.
snibgo's IM pages: im.snibgo.com
Post Reply