mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
LibGfx/WebPLoader: Use transparent black as animation background color
This matches libwebp (see ZeroFillCanvas() call in libwebp/src/demux/anim_decode.c:355 and ZeroFillFrameRect() call in line 435, but in WebPAnimDecoderGetNext()) and makes files written e.g. by asesprite look correct -- even though the old behavior is also spec-compliant and arguably makes more sense. Now nothing looks at the background color stored in the file. See PR for an example image where it makes a visible difference. Cherry-picked from serenityos master 276a904d20ffe260b5544a9ace9841d083e0243
This commit is contained in:
parent
be644e5d5d
commit
83d0452e69
Notes:
sideshowbarker
2024-07-18 02:44:04 +09:00
Author: https://github.com/nico Commit: https://github.com/LadybirdBrowser/ladybird/commit/83d0452e69a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/636 Issue: https://github.com/LadybirdBrowser/ladybird/issues/593 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/LucasChollet Reviewed-by: https://github.com/doctortheemh
1 changed files with 1 additions and 1 deletions
|
@ -923,7 +923,7 @@ TEST_CASE(test_webp_extended_lossless_animated)
|
|||
EXPECT_EQ(frame.image->get_pixel(500, 700), Gfx::Color::Yellow);
|
||||
|
||||
// This one isn't the same in all frames.
|
||||
EXPECT_EQ(frame.image->get_pixel(500, 0), (frame_index == 2 || frame_index == 6) ? Gfx::Color::Black : Gfx::Color(255, 255, 255, 0));
|
||||
EXPECT_EQ(frame.image->get_pixel(500, 0), (frame_index == 2 || frame_index == 6) ? Gfx::Color::Black : Gfx::Color(0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue