Convert an EPS,TIF to GIF with a minimum loss of quality

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
MrsCalahan
Posts: 9
Joined: 2009-05-13T01:28:22-07:00
Authentication code: 8675309

Convert an EPS,TIF to GIF with a minimum loss of quality

Post by MrsCalahan »

Hi,

I'have to convert EPS and TIF images for an application.
At the moment it works so:

EPS -> (with gs) PNG -> (with Image:Magick) GIF

It's the same way if the input image is an TIF.
I knew that I always have a lost of quality if I convert an image, but it is necessary for the next Steps in the Framework. We need Gif images.

What is the line of least quality loss to convert EPS / TIF images to GIF?

Which parameters can I use? Or is there any chance to get an GIF without the PNG step? -> EPS -> GIF?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert an EPS,TIF to GIF with a minimum loss of quality

Post by fmw42 »

I am not an expert of eps format, but see http://www.imagemagick.org/Usage/formats/#eps

have you tried just using

convert image.eps image.gif

or supersampling

convert -density 400 image.eps -resize 25% image.gif
MrsCalahan
Posts: 9
Joined: 2009-05-13T01:28:22-07:00
Authentication code: 8675309

Re: Convert an EPS,TIF to GIF with a minimum loss of quality

Post by MrsCalahan »

Thanks for your link!
At the moment I haven't time to read it, but I think I can do it at the afternoon.
I used:

Code: Select all

convert image.eps image.gif
and if you use

Code: Select all

convert -verbose image.eps image.gif
I've seen it does internally the same as I did.
EPS ->(with gs to) -> PNG -> (image magick) -> convert foo.png bar.gif

I have the additional problem that

Code: Select all

identify -format "%x %y" my.eps
delivers the wrong values for DPI. Which I need to use gs correct. :(

What does

Code: Select all

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

Re: Convert an EPS,TIF to GIF with a minimum loss of quality

Post by fmw42 »

see http://www.imagemagick.org/script/escape.php

if

identify -format "%x %y" my.eps

gives the wrong values, then post a bug report with your eps file.


-density 400 will set the density of the image to 400

My note above is a supersampling technique, that is slow, but expands the density by 400x then resizes by 25% to compensate. Sometimes that gives better quality.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert an EPS,TIF to GIF with a minimum loss of quality

Post by anthony »

MrsCalahan wrote:I have the additional problem that

Code: Select all

identify -format "%x %y" my.eps
delivers the wrong values for DPI. Which I need to use gs correct. :(
EPS files are vecotr images, which typically have no default DENSITY setting!

Vector images unlike raster images are draw and will draw generally at ANY density or resolution.
That is what they are used for!

Of course a raster image embedded in a vector image will have a particular density, but the vector image format will hide the 'ideal' density for the raster data from the user.

That is the facts, and also the problem when you want to later recover raster images from vector files.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
MrsCalahan
Posts: 9
Joined: 2009-05-13T01:28:22-07:00
Authentication code: 8675309

Re: Convert an EPS,TIF to GIF with a minimum loss of quality

Post by MrsCalahan »

fmw42 wrote: if
identify -format "%x %y" my.eps
gives the wrong values, then post a bug report with your eps file.
Hi,
I've seen that the newer version (8.64) of GS doesn't have this problem any longer. Version 8.62. delivered the wrong values if I use the same picture.

So I use the newer version an everything is fine.
Post Reply