Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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