Re: Problem resizing animated gif with transparency
Bob Friesenhahn <[email protected]> Tue, 16 Feb 2010 11:06:14 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 16 Feb 2010, Dan Tsohar wrote: > > If I take the following picture: > http://dl.dropbox.com/u/574561/tiger.gif > > And resize it with the command: > "gm convert tiger.gif -coalesce -resize 80x80+0+0% out.gif" > > I get the following result: > http://dl.dropbox.com/u/574561/out.gif > > (Transparency is gone and turned black) > > I have also seen that transparency sometimes turns to grey. The problem with simple 'transparency' when the base image does not start with a color is that the resulting color depends on whatever background color or image the animation is played on. Undefined pixels still need to have a color even if you can't see it. The default background color is black. If you expect a background color of white, then use gm convert tiger.gif -background white -coalesce -resize 80x80+0+0% out.gif It does seem like a bug that -coalesce does not preserve binary transparency and I notice that recent ImageMagick does better in this regard. If you can submit a formal bug report via the GraphicsMagick SourceForge bug tracker, then I will work to fix this. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev