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

LibGfx/ICO: Decode the header in create() and remove initialize()

This is done as a part of #19893.
This commit is contained in:
Lucas CHOLLET 2023-07-17 12:24:16 -04:00 committed by Sam Atkins
parent a8587fe54e
commit 38dd4168be
3 changed files with 5 additions and 31 deletions

View file

@ -77,14 +77,7 @@ TEST_CASE(test_not_ico)
{
auto file = MUST(Core::MappedFile::map(TEST_INPUT("buggie.png"sv)));
EXPECT(!Gfx::ICOImageDecoderPlugin::sniff(file->bytes()));
auto plugin_decoder = MUST(Gfx::ICOImageDecoderPlugin::create(file->bytes()));
EXPECT(plugin_decoder->initialize().is_error());
EXPECT(plugin_decoder->frame_count());
EXPECT(!plugin_decoder->is_animated());
EXPECT(!plugin_decoder->loop_count());
EXPECT(plugin_decoder->frame(0).is_error());
EXPECT(Gfx::ICOImageDecoderPlugin::create(file->bytes()).is_error());
}
TEST_CASE(test_bmp_embedded_in_ico)