Commits
Commits on
00c1b3ff2d80d84fef71bb6208110dedbbd95fc4Filtered to crates/ec-image/Cargo.tomlClear filter2026-08-26
feat(image): GIF decoding and a format-agnostic animation surfaceAhmet Kaan Gümüş · 166bcc8
feat(image): GIF decoding and a format-agnostic animation surface A GIF87a/GIF89a decoder written to the spec: LSB-first LZW with the one-code-early width bump and the cScSc case, sub-block chains, the four-pass interlace, graphic control extensions, local and global colour tables, and frame compositing with all four disposal methods. Adds decode_animation(), which every format answers -- a still is one frame with a zero delay -- so a caller that wants to play something never branches on the format. One colour form is chosen for the whole animation, so the pixel layout cannot change under a caller mid-walk. Gated pixel-exact against the incumbent decoder: 6/6 fixtures, and 7/7 real GIFs on this machine over 454 frames, frame count and per-frame delays included. Two 10 000-round mutation sweeps cover the still and the animation path.
2026-08-14
feat(image): PNG decoding and the still-image APIAhmet Kaan Gümüş · 7bceff2
feat(image): PNG decoding and the still-image API ec-image decodes stills for the engine's placed-picture path. This first stage is the shared API — format guessing from content, a Pixels buffer in the file's own colour form, parsed-but-unapplied metadata, and pixel limits checked before any buffer is sized from a header — plus the PNG decoder over ec-inflate. Every colour type at every legal bit depth, all five filter types, Adam7 interlace, palette and colour-key transparency, gamma and sRGB exposed, ancillary chunks skipped by length, and every chunk CRC verified: a PNG that fails its own checksum is refused rather than decoded into a picture nobody can tell is wrong. scripts/gen-still-fixtures.sh generates the seeded corpus the later stages measure against; the fixtures themselves stay out of the repository.