gif output and transparency - ImageMagick 6.6.4-1 fedora 14

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jbh97

gif output and transparency - ImageMagick 6.6.4-1 fedora 14

Post by jbh97 »

Hello - this is my first post here so firstly - thanks for the incredibly useful software!

I'm having an issue with gif transparency...which I am hoping someone can confirm as a bug or user error (I am assuming the first as previous versions of imagemagick seemed to behave differently)....

Previously (eg with ImageMagick 6.4.0) when converting from pngs to gifs eg

Code: Select all

convert right.png right.gif
or manipulating gifs eg:

Code: Select all

convert right.gif -transparent white right.gif
would yield a gif with suitable transparency. But using the latest fedora 14 binary release (ImageMagick 6.6.4-1 2010-10-05 Q16) yields a gif with an opaque (white) background. I cannot seem to find a recipie to output a gif with any transparency.....

example
input png Image
output of convert right.png right.gif: Image

Bug or user error? If a bug - is there a workaround?

Thanks in advance
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: gif output and transparency - ImageMagick 6.6.4-1 fedora

Post by anthony »

There certainally seems to be a bug.

The GIF loses transparency when I do...

Code: Select all

convert right.png right.gif
But converting to MIFF and displaying shows the MIFF still has transparency.

Code: Select all

convert right.png right.miff
Doing the same though MIFF however does NOT fix the problem

Code: Select all

convert right.png right.miff
convert right.miff right.gif
The MIFF shows a transparent background, but the GIF does not!

So whatever is the problem is still present in the MIFF intermediate file format.
As that format has a text based header for ALL image meta data it much be one of the following...

Code: Select all

sed -n '/^\f$/q; p' right.miff
id=ImageMagick version=1.0
class=DirectClass colors=0 matte=True
columns=16 rows=16 depth=8
colorspace=RGB
compression=Zip quality=0
units=PixelsPerCentimeter
resolution=35.43x35.43
page=16x16+0+0
date:create={2010-11-15T13:56:57+10:00}
date:modify={2010-11-15T13:56:57+10:00}
Software={www.inkscape.org}
As you can see transparency is enabled 'matte=True', But I can not see anything else that could be causing the save to GIF to fail. Everything about the header appears right!

Trying a different tack... using 'txt' image to remove all meta data!

Code: Select all

convert right.png right.txt
convert right.txt right.gif
I still get a GIF without transparency!
And yet the 'IM Enumerated Text Image' file clearly shows pixels with transparency.


Basically I can prettywell be assured that the GIF save for this image and just the image data, is causing it to 'loose transparency. No meta-data is causing the problem.


This is definitely a BUG! but it is only involving image data, not meta-data.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: gif output and transparency - ImageMagick 6.6.4-1 fedora

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.6.5-9 available by sometime tomorrow. Thanks.
Post Reply