Page 1 of 1

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

Posted: 2009-05-13T01:52:42-07:00
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?

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

Posted: 2009-05-13T09:57:20-07:00
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

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

Posted: 2009-05-14T00:46:17-07:00
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

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

Posted: 2009-05-14T09:16:04-07:00
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.

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

Posted: 2009-05-14T22:57:13-07:00
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.

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

Posted: 2009-05-17T23:39:14-07:00
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.