1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibGfx: Implement is_animated() and frame_count() for webp plugin

This commit is contained in:
Nico Weber 2023-02-25 22:15:34 -05:00 committed by Linus Groh
parent 0393a37843
commit 3c5450b8be
2 changed files with 22 additions and 7 deletions

View file

@ -284,9 +284,10 @@ TEST_CASE(test_webp_extended_lossless_animated)
auto plugin_decoder = MUST(Gfx::WebPImageDecoderPlugin::create(file->bytes()));
EXPECT(plugin_decoder->initialize());
// FIXME: These three lines are wrong.
EXPECT_EQ(plugin_decoder->frame_count(), 1u);
EXPECT(!plugin_decoder->is_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->size(), Gfx::IntSize(990, 1050));