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
FileDimensionsBytesExport settings
gradient-source.png768 × 192793Optimize: True
gradient-eight-colors.gif768 × 1923,155Optimize: 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

Sources