Menu

What one 10-frame sample can and cannot tell you before you change your GIF export settings
📰

What one 10-frame sample can and cannot tell you before you change your GIF export settings

DEV Community: javascript·AsyncMonk·14 days ago
#oFRp5kV9
#devtojavascript#devto#dev#colours#bytes
Reading 0:00
15s threshold

Before changing the export settings of demo GIFs for a small site, I wanted to know two things: does turning dithering on cost bytes, and how far does a lower colour count go. All I had to look at was one sample, a 10-frame GIF, so this is a list of what it answered and what it left open.

The sample is File:MORPH.gif from Wikimedia Commons, author Kowloonese, CC BY-SA 3.0. It is 675×599, 10 frames at 100 ms each, 3,003,893 bytes, a photo-style gradient with text morphing across it. I ran it through the animation tool in ImgIng (图映) https://imging.ai/ in a desktop browser, then rebuilt the same variants with Pillow and gifsicle 1.98 to see whether the pattern survives a second pipeline. One file, one Apple M4, one run each, and every size below is exact bytes.

What the sample settled

Fewer colours means fewer bytes, and by a lot. In the tool, with dithering off, 256 colours gave 1,525,126 bytes and 32 colours gave 811,310.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.