pixelpix / guides

Why is my GIF so big? We measured what actually bloats a GIF

GIF is a 35-year-old format with one compression trick: it's great at repetition and terrible at noise. Every oversized GIF comes down to that one fact. We ran the numbers with pixelpix's own engine — the same gifsicle build our GIF compressor uses — so here they are, in bytes, with the method spelled out.

The one rule: noise is the enemy

GIF compresses by spotting runs — stretches of identical pixels — and storing them once. Flat areas and repeated frames cost almost nothing; per-pixel variation costs nearly full price. To measure just how much, we generated the same 24-frame, 240×136 animation twice: once clean, once with mild camera-style grain added to every frame. Nothing else changed.

Same animationSize
Clean44 KB
With grain359 KB — 8.2× bigger

That's why screen recordings and video-derived GIFs balloon: sensor grain and compression shimmer read as "everything changes every frame" to GIF. It's also the key to understanding dithering.

Dithering: deliberately adding the thing GIF hates

When a GIF is reduced to fewer colours, smooth gradients turn into visible bands. Dithering hides the bands by scattering the two nearest colours in a speckle pattern — it looks smoother, but that speckle is noise, applied to exactly the areas that used to compress best. We reduced a smooth, photograph-like 480×270 sunset clip to 64 colours both ways:

64-colour reductionSize
No dither143 KB
Ordered dither354 KB — 2.5×
Floyd–Steinberg dither350 KB — 2.4×

Worth sitting with that: the original was 410 KB. Cutting to 64 colours saved 65%. Turning dithering on gave almost all of it back — the "compressed" file ended up just 15% smaller than the original.

The cost depends entirely on the content. On our small, mostly-flat UI-style animation the same switch cost 21–27%. And on the already-grainy clip it cost roughly nothing — the noise was already there, so the speckle added none. The bitter irony is that dithering costs the most on smooth gradient imagery, which is precisely where banding shows and people reach for it.

Two smaller findings

What this means for your GIF

pixelpix's GIF compressor ships with these findings as its defaults — dithering off, diversity palette, size-tiered optimization — and its Advanced panel lets you flip each one and watch the bytes move yourself. Free, in your browser, nothing uploaded.

Method, for the sceptical

Clips were generated and encoded with pixelpix's own pipeline (gifski at quality 90), then processed with a WebAssembly build of gifsicle using -O2 --colors N --color-method=diversity plus the stated dither flag. Three subjects: a 240×136 24-frame gradient animation; the same with ±9-level uniform grain; a 480×270 16-frame smooth gradient clip. Sizes are output bytes as reported by the engine. It all runs client-side, so you can reproduce every number on the compressor itself.

More guides

← back to pixelpix · about · privacy