mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:28:12 +00:00
Tests: Add test for webp lossless decoding
This commit is contained in:
parent
c84968dafd
commit
09dd9c4fad
1 changed files with 16 additions and 0 deletions
|
@ -330,6 +330,22 @@ TEST_CASE(test_webp_extended_lossless)
|
|||
EXPECT(!plugin_decoder->loop_count());
|
||||
|
||||
EXPECT_EQ(plugin_decoder->size(), Gfx::IntSize(417, 223));
|
||||
|
||||
auto frame = MUST(plugin_decoder->frame(0));
|
||||
EXPECT_EQ(frame.image->size(), Gfx::IntSize(417, 223));
|
||||
|
||||
// Check some basic pixels.
|
||||
EXPECT_EQ(frame.image->get_pixel(0, 0), Gfx::Color(0, 0, 0, 0));
|
||||
EXPECT_EQ(frame.image->get_pixel(43, 75), Gfx::Color(255, 0, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(141, 75), Gfx::Color(0, 255, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(235, 75), Gfx::Color(0, 0, 255, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(341, 75), Gfx::Color(0, 0, 0, 128));
|
||||
|
||||
// Check pixels using the color cache.
|
||||
EXPECT_EQ(frame.image->get_pixel(94, 73), Gfx::Color(255, 0, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(176, 115), Gfx::Color(0, 255, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(290, 89), Gfx::Color(0, 0, 255, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(359, 73), Gfx::Color(0, 0, 0, 128));
|
||||
}
|
||||
|
||||
TEST_CASE(test_webp_extended_lossless_animated)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue