Hi!
From http://bugs.debian.org/536892
Using this file and running convert -density 240 -trim input.ps output.gif, we are seeing a poor result if compared with ImageMagick 6.2.4-5
With the older version we have this, while with newer versions we see this.
I can see the same poor result with latest 6.5.4-9
Did something change when encoding a GIF file?
Thank you.
PS to GIF conversion producing poor results
Re: PS to GIF conversion producing poor results
Try this command:
- convert -density 240 input.ps -trim -flatten output.gif
Re: PS to GIF conversion producing poor results
With --flatten it did work as expected.
Will this behavior be changed or it will be necessary to always include --flatten, please?
Will this behavior be changed or it will be necessary to always include --flatten, please?
Re: PS to GIF conversion producing poor results
ImageMagick must choose a Ghostscript device based on the attributes of the Postscript file. If the image is EPS we use the pngalpha device since many EPS images have transparency. If you don't want transparency, use -flatten as recommended which composites the transparent image onto the image background color.
Re: PS to GIF conversion producing poor results
Hi!
From another user:
From another user:
Please consider that adding -flatten parameter is not a solution for all
purposes, because transparency is often needed in output images.
-
- Posts: 63
- Joined: 2009-03-12T01:52:24-07:00
- Authentication code: 8675309
- Location: Germany, Stuttgart
Re: PS to GIF conversion producing poor results
Well gif didn´t support Alpha Channels so if you got some and you want a gif you need flatten etc. Same problem also in other formats (jpeg, .....).Please consider that adding -flatten parameter is not a solution for all
purposes, because transparency is often needed in output images.
Workaround: First check what you got in picture and than check what the new picture will support.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PS to GIF conversion producing poor results
I hope this is what you are looking for:inkdroplet wrote:This is my last bumped thread I promise. The search feature has been my best friend today. My question for you Magick, is the flatten command the same thing as rasterizing a layer like in Photoshop? Instead of answering the question because I have a lot of wonder, maybe just a link to the command description or something would be very helpful. Thanks so much, and I apologize for reviving a couple of old topics, but I have been learning a ton.magick wrote:ImageMagick must choose a Ghostscript device based on the attributes of the Postscript file. If the image is EPS we use the pngalpha device since many EPS images have transparency. If you don't want transparency, use -flatten as recommended which composites the transparent image onto the image background color.
see Anthony's Examples
http://www.imagemagick.org/Usage/layers/#flatten
and descriptions of -layers flatten at
http://www.imagemagick.org/script/comma ... php#layers
-flatten is a shortcut for -layers flatten
Re: PS to GIF conversion producing poor results
It took me quite long to go deeply into positioning of layered images, but without the instructions it'd much worse. Thanks, fmw42!
Last edited by Jorge on 2012-06-21T01:02:07-07:00, edited 2 times in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: PS to GIF conversion producing poor results
-flatten basically generates a background color image the same size as the virtual canvas of the first image.
It then composites every image onto this background.
If multiple images are not involved then it essentially replaces any transparency with the default background color 'white'.
An alternative if you want to preserve multiple images is to use -boardcolor white -border 0 . This may not seem 'sensible' but it does basically the same thing, compose the image onto a white fully-opaque background to remove all transparency.
The other differences is that -border uses a different color setting, keeps multiple images separate, and it uses the images real dimensions instead of the the virtual canvas and offset.
It then composites every image onto this background.
If multiple images are not involved then it essentially replaces any transparency with the default background color 'white'.
An alternative if you want to preserve multiple images is to use -boardcolor white -border 0 . This may not seem 'sensible' but it does basically the same thing, compose the image onto a white fully-opaque background to remove all transparency.
The other differences is that -border uses a different color setting, keeps multiple images separate, and it uses the images real dimensions instead of the the virtual canvas and offset.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/