6

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

1 Answer 1

5

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.