Open almost any GIF from the web in GIFmeta and you’ll see Δ next to most frames. The GIF is frame-optimized: to keep the file small, a frame only stores what changed since the previous frame.
Three tricks that make GIFs small
| Trick | What’s stored |
|---|---|
| Sub-rectangles | a frame covers only the area that changed, not the whole canvas |
| Transparent pixels | unchanged pixels inside that area are left transparent, so the frame below shows through |
| Disposal | what happens to a frame before the next one is drawn: keep it, clear its area, or restore the previous canvas |
Tools like gifsicle (-O) and ImageMagick (-layers Optimize) combine all three.
Keyframes and delta frames
- 🔑 Keyframe — the frame doesn’t depend on anything drawn before it. Safe to edit, move or delete.
- Δ Delta frame — it is drawn on top of earlier frames and only makes sense in that position.
GIFmeta marks every frame. On the command line:
gifmeta info input.gif --show-frames
# 🧩Optimized : yes (1 keyframes / 40 frames)
# 🔑 Frame 0: 10 cs rect 0,0 800×516 dispose Keep
# Δ Frame 1: 10 cs rect 312,140 96×80 dispose Keep (transparent index: 0)
In the desktop app, switch the viewer between ✨ Pretty (the frame as it plays) and 🧩 Raw (only the pixels the frame stores, on a checkerboard).
Why editing optimized GIFs breaks them
Delete frame 5 and frame 6 is now drawn on top of frame 4 — but it only stores the changes from frame 5. The missing pixels show up as smears. Re-ordering and inserting frames cause the same problem.
How GIFmeta keeps edits safe
GIFmeta replays the original and the edited animation side by side. For every frame it compares the canvas the frame is drawn on:
- same canvas → the frame is copied unchanged (lossless, small)
- different canvas → the frame is rewritten as a full image of exactly how it looked
Usually only the frame right after the change is rebuilt. Want every frame independent? Use 🧱 Unoptimize
(gifmeta mod input.gif --unoptimize -o flat.gif) — bigger file, but safe to edit in any tool.