converting jpg to eps using 300dpi resolution

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
MOS
Posts: 2
Joined: 2014-01-31T22:37:29-07:00
Authentication code: 6789

converting jpg to eps using 300dpi resolution

Post by MOS »

Hi,
I am having troubles using ImageMagick-6.8.8-1 and the convert command.

This works fine:
convert image.jpg -units pixelsperinch -density 300x300 resultimage.jpg
identify -verbose resultimage.jpg
the identify command shows that resultimage.jpg has 300x300 dpi resolution

This doesn`t work:
convert image.jpg -units pixelsperinch -density 300x300 result.eps
identify -verbose result.eps
the identify command shows that result.eps has 72x72 dpi resolution

This doesn`t work either, starting with a 300x300 dpi image:
convert resultimage.jpg -units pixelsperinch -density 300x300 result.eps
identify -verbose result.eps
the identify command shows that result.eps has 72x72 dpi resolution

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

Re: converting jpg to eps using 300dpi resolution

Post by fmw42 »

EPS is a vector format and thus has no density. You have to give it a density when you read it in. In this case, you are putting a vector wrapper around a 72x72 dpi raster image. That is why you get 72 dpi from identify.

see
http://www.imagemagick.org/Usage/formats/#ps
http://www.imagemagick.org/Usage/formats/#vector
MOS
Posts: 2
Joined: 2014-01-31T22:37:29-07:00
Authentication code: 6789

Re: converting jpg to eps using 300dpi resolution

Post by MOS »

Thank you for the explanation about eps files.
But, if an eps file doesn't have dpi resolution, why the command identify returns 72x72 dpi as resolution?. I have also applied this command to other eps files and some of them appears to have 300x300 dpi resolution.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting jpg to eps using 300dpi resolution

Post by fmw42 »

I am not an expert on EPS files. But they are vector files with no dpi. If you imbed a raster image in an EPS and the raster image has some dpi, then perhaps IM is returning the raster image's dpi. Or it sees no dpi and just returns the default of 72 which is assigned to the vector eps.

Perhaps one of the other IM uses knows more about eps files and can correct me or confirm what is going on.
Post Reply