GIF with transparency output not as expected in GIMP


I have been trying to create a GIF using a sequence of PNGs within GIMP

An example PNG from the sequence shows the correct transparency I want to be shown in the GIF, right transparency

But when I process the PNG sequences in GIMP and create the GIF image, I get the following result:

screen shot of gif image half way through, transparency is weird

What am I doing wrong here?

I have set the settings to create the animation frame by frame, additionaly making sure that the RGBA setting was selected.

Can anyone show me a solution to this problem?

Thanks, Chris

8/20/2013 10:47:00 PM

You are faced with a limitation of the GIF color specification. Other than PNG GIF does not support semi-transparent colours.

The origingal PNG however is made up with semi-transparent colors as can be seen when looking at the original in checkerboard mode:

enter image description here

After we had exported this RGB file with alpha channel as GIF we will have reduced the colors to 256 or less but we will only have one single transparent color (white) represented in the resulting GIF:

enter image description here

We therefore have to simulate semi-transparency by dithering the image before we are able to export it as GIF. This is done with the tool Image - Mode - Indexed...

enter image description here

Select Enable dithering of transparency with any method (here Floyd-Steinberg (reduced color bleeding)). After that we can see the dithered image:

enter image description here

Which we can then export as GIF:

enter image description here

For deeper insights into transparency handling for GIF animations the following tutorial is highly recommended:

8/21/2013 2:56:00 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow