mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-21 07:55:17 +00:00
If a lossless webp has 3 or 4 colors, it uses 2 bits per pixel to store an offset into a "color index" (which the spec explicitly does not call palette since it says the 'color cache' is more like that). This way, it can pack 4 pixels into a single pixel. If the width of the output image wasn't evenly divisble by 4, we used to write out-of-bounds in the last few columns of each row, since we used to always write all 4 pixels. Found by clusterfuzz. Probably fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66082 While here, spruce up the comments very slightly.
44 KiB
44 KiB