Commits
Commits on
8dbd683068d7f87f21dcc4ed1dfdca786d82c52bFiltered to scripts/gen-still-fixtures.shClear filter2026-08-26
feat(image): decode BMP, including the shapes ImageMagick will not writeAhmet Kaan Gümüş · f1f296e
feat(image): decode BMP, including the shapes ImageMagick will not write gpui names ImageFormat::Bmp, so the shim needed a decoder behind it. This reads every shape the format defines: 1/2/4/8/16/24/32-bit samples, palettes with three- or four-byte entries, BI_RLE4 and BI_RLE8, arbitrary BI_BITFIELDS masks, bottom-up and top-down rows, and headers of every defined length from the 12-byte OS/2 v1 to the 124-byte BITMAPV5HEADER. Two shapes that started as refusals are decoded instead. BI_PNG and BI_JPEG files are a BMP header wrapped around a whole file of another format, so they are handed to this crate's own PNG and JPEG decoders. The 16-byte OS/2 v2 header is the Windows layout truncated where the two stop agreeing, so it is read through those 16 bytes -- which is what ffmpeg does, and what the incumbent image crate refuses. Gate: fourteen fixtures pixel-exact against image 0.25.10, the two wrapper files exact against the incumbent decoding their payloads directly, and the OS/2 v2 file exact against the same picture in a header the incumbent reads. Twenty thousand fuzz mutations across the plain and run-length paths, no panics. Full report in lanes/image-bmp-r1.report.md.
feat(image): animated WebP, composited frame by frameAhmet Kaan Gümüş · 275d306
feat(image): animated WebP, composited frame by frame decode_frames walks the ANMF chunks and composites them onto the canvas: frame rectangles, both blending methods, and dispose-to-background applied before the next frame is drawn. is_animated answers from the container alone. The still and animated paths now share one payload decoder. The incumbent decoder ignores the dispose-to-background flag, so it cannot be the oracle for the frame after a disposal: that fixture is gated against libwebp's own composited frames instead, pixel-exact, and the incumbent remains the oracle for the opaque fixture. ffmpeg refuses animated WebP outright and cannot arbitrate. Adds a lossless fixture whose three frames carry alpha and exercise both blending methods and the disposal rectangle -- the existing animation is opaque and disposes nothing.
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.