When someone says "turn dithering off and the GIF gets smaller", I want a number I can reproduce before I repeat it in a code review. File size alone does not say why, so I wrote a script that counts how many codes a GIF-style LZW encoder emits for the same frames with dithering off and on. It needs Pillow and numpy and runs locally, so nothing leaves the machine, which matters when the animation is a pre-release product screen.
The sample is MORPH.gif from Wikimedia Commons, by Kowloonese, CC BY-SA 3.0: 675×599, 10 frames, 100 ms each, 3,003,893 bytes. It is a photo-like fade with text, and nearly every pixel changes between frames. I blurred each frame slightly (Gaussian radius 0.8) to flatten noise already baked into the original. That blur is my own processing, so every number below belongs to the blurred copy.…