Discussion:
[GM-bugs] Problem resizing animated gif with transparency
Dan Tsohar
2010-02-16 11:28:17 UTC
Permalink
Hi,

I'm running GraphicsMagick version 1.3.10.

I have a problem with resizing animated gifs with transparency in
it.

If I take the following
picture:Loading Image...
<Loading Image...>

And resize it with the command:
"gm convert tiger.gif -coalesce -resize 80x80+0+0% out.gif"

I get the following result:Loading Image...

(Transparency is gone and turned black)

I have also seen that transparency sometimes turns to grey.

Is this a known bug? Are there any workarounds?

Regards,
Dan
Bob Friesenhahn
2010-02-16 17:06:14 UTC
Permalink
Post by Dan Tsohar
http://dl.dropbox.com/u/574561/tiger.gif
"gm convert tiger.gif -coalesce -resize 80x80+0+0% out.gif"
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
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Loading...