1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:37:35 +00:00

LibGfx: Implement WebPImageDecoderPlugin::loop_count()

Turns out extended-lossless-animated.webp did have a loop count of 0.
So I opened it in Hex Fiend and changed the byte at position 42
(which is the first byte of the little-endian u16 storing the loop
count) to 0x2A, so that the test can compare the loop count to something
not 0.
This commit is contained in:
Nico Weber 2023-02-26 09:13:27 -05:00 committed by Linus Groh
parent 3c5450b8be
commit fa34832297
3 changed files with 33 additions and 5 deletions

View file

@ -286,9 +286,7 @@ TEST_CASE(test_webp_extended_lossless_animated)
EXPECT_EQ(plugin_decoder->frame_count(), 8u);
EXPECT(plugin_decoder->is_animated());
// FIXME: This is wrong.
EXPECT(!plugin_decoder->loop_count());
EXPECT_EQ(plugin_decoder->loop_count(), 42u);
EXPECT_EQ(plugin_decoder->size(), Gfx::IntSize(990, 1050));
}