mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
Tests: Add test for webp with color index transform and alpha_used=false
This just works at the moment aftere19892a099
, 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 ofe19892a099
for more information.
This commit is contained in:
parent
9f24c1b34c
commit
da48238fbd
Notes:
sideshowbarker
2024-07-16 20:44:03 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/da48238fbd Pull-request: https://github.com/SerenityOS/serenity/pull/19502
@ -492,11 +492,14 @@ TEST_CASE(test_webp_simple_lossless_color_index_transform_pixel_bundling)
|
||||
// catdog-alert-2 tests the 1-bit-per-pixel case,
|
||||
// catdog-alert-3 tests the 2-bit-per-pixel case,
|
||||
// catdog-alert-8 and catdog-alert-13 both test the 4-bits-per-pixel case.
|
||||
// catdog-alert-13-alpha-used-false is like catdog-alert-13, but with is_alpha_used set to false in the header
|
||||
// (which has the effect of ignoring the alpha information in the palette and instead always setting alpha to 0xff).
|
||||
TestCase test_cases[] = {
|
||||
{ "webp/catdog-alert-2.webp"sv, Gfx::Color(0x35, 0x12, 0x0a, 0xff), Gfx::Color(0xf3, 0xe6, 0xd8, 0xff) },
|
||||
{ "webp/catdog-alert-3.webp"sv, Gfx::Color(0x35, 0x12, 0x0a, 0xff), Gfx::Color(0, 0, 0, 0) },
|
||||
{ "webp/catdog-alert-8.webp"sv, Gfx::Color(0, 0, 0, 255), Gfx::Color(0, 0, 0, 0) },
|
||||
{ "webp/catdog-alert-13.webp"sv, Gfx::Color(0, 0, 0, 255), Gfx::Color(0, 0, 0, 0) },
|
||||
{ "webp/catdog-alert-13-alpha-used-false.webp"sv, Gfx::Color(0, 0, 0, 255), Gfx::Color(0, 0, 0, 255) },
|
||||
};
|
||||
|
||||
for (auto test_case : test_cases) {
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 400 B |
Loading…
Reference in New Issue
Block a user