Commit graph

3 commits

Author SHA1 Message Date
Nico Weber
0805319d1e LibGfx/WebPLoader: Diagnose mismatch between VP8X and VP8L alpha bits
If this turns out to be too strict in practice, we can replace it with
a `dbgln("VP8X and VP8L headers disagree about alpha; ignoring VP8X");`
instead.

ALso update catdog-alert-13-alpha-used-false.webp to not trigger this.
I had manually changed the VP8L alpha flag at offset 0x2a in
da48238fbd to clear it, but I hadn't changed the VP8X flag.
This changes the byte at offset 0x14 from 0x10 (has_alpha) to 0x00
(no alpha) as well, to match.
2024-05-08 16:34:11 +02:00
Nico Weber
da48238fbd Tests: Add test for webp with color index transform and alpha_used=false
This just works at the moment after e19892a099, but if we ever do
the FIXME in ColorIndexingTransform::transform(), this test will
remind us to think of this case there too.

catdog-alert-13-alpha-used-false.webp is identical to
catdog-alert-13.web but with the byte at offset 0x2a changed from
0x10 to 0x00  -- that is, the bit in the VP8L header that stores
`is_alpha_used` is cleared.

See the commit message of e19892a099 for more information.
2023-06-20 11:35:03 +02:00
Nico Weber
c0fe9cee97 Tests: Move webp test images into webp/ subfolder 2023-06-19 06:42:00 -04:00