mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +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:
parent
750f1d580a
commit
2b866e3c9b
22 changed files with 105 additions and 155 deletions
|
@ -142,11 +142,11 @@ void SpiceAgent::on_message_received()
|
|||
} else {
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
if (type == ClipboardType::PNG) {
|
||||
bitmap = Gfx::PNGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
bitmap = Gfx::PNGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).frame(0).image;
|
||||
} else if (type == ClipboardType::BMP) {
|
||||
bitmap = Gfx::BMPImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
bitmap = Gfx::BMPImageDecoderPlugin(data_buffer.data(), data_buffer.size()).frame(0).image;
|
||||
} else if (type == ClipboardType::JPG) {
|
||||
bitmap = Gfx::JPGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
bitmap = Gfx::JPGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).frame(0).image;
|
||||
} else {
|
||||
dbgln("Unknown clipboard type: {}", (u32)type);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue