What is a GIF file?
GIF uses a limited color palette for each image frame and can store animation. Its transparency is an on-or-off palette choice, not smooth partial transparency.
Where the limit shows
A soft gradient may turn into visible bands. A smooth transparent edge may become rough against a different background. Check the exported edges on the background where the image will appear.
A gradient reduced to eight colors


Reducing this gradient to eight colors turns the smooth transition into bands. Dithering is off here; other GIF exports can use more colors and dithering.
Settings and measurements
| File | Dimensions | Bytes | Export settings |
|---|---|---|---|
| gradient-source.png | 768 × 192 | 793 | Optimize: True |
| gradient-eight-colors.gif | 768 × 192 | 3,155 | Optimize: False |
Python 3.14.4, Pillow 13.0.0, Platform Linux, Webp 1.6.0, Jpeg 6.2, Avif 1.4.2
An animation is more than its first frame
A still-image conversion can keep one frame and discard the movement. Use an export path that explicitly supports animation when movement matters.
For a new still graphic
Use PNG for a still graphic that needs more colors or smooth transparency. For animation, check which formats the destination accepts.
Related guides
- Why does a smooth gradient show bands?
- Why did an animated image stop moving?
- Why does a transparent image have a black background?
Sources
- CompuServe / W3C archive: GIF89a specification