1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibGfx: Remove ImageDecoderPlugin::bitmap() in favor of frame(index)

To encourage proper support for multi-frame images throughout the
system, get rid of the single-frame convenience bitmap() API.
This commit is contained in:
Andreas Kling 2021-11-18 13:47:29 +01:00
parent 750f1d580a
commit 2b866e3c9b
22 changed files with 105 additions and 155 deletions

View file

@ -14,7 +14,7 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
Gfx::GIFImageDecoderPlugin gif_decoder(data, size);
auto bitmap = gif_decoder.bitmap();
auto bitmap = gif_decoder.frame(0).image;
if (bitmap) {
// Looks like a valid GIF. Try to load the other frames:
dbgln_if(GIF_DEBUG, "bitmap size: {}", bitmap->size());