mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
SpiceAgent: Use image decoder plugins instead of deprecated wrappers
This commit is contained in:
parent
62ce7653cb
commit
481e7b7971
1 changed files with 3 additions and 3 deletions
|
@ -142,11 +142,11 @@ void SpiceAgent::on_message_received()
|
|||
} else {
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
if (type == ClipboardType::PNG) {
|
||||
bitmap = Gfx::load_png_from_memory(data_buffer.data(), data_buffer.size());
|
||||
bitmap = Gfx::PNGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
} else if (type == ClipboardType::BMP) {
|
||||
bitmap = Gfx::load_bmp_from_memory(data_buffer.data(), data_buffer.size());
|
||||
bitmap = Gfx::BMPImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
} else if (type == ClipboardType::JPG) {
|
||||
bitmap = Gfx::load_jpg_from_memory(data_buffer.data(), data_buffer.size());
|
||||
bitmap = Gfx::JPGImageDecoderPlugin(data_buffer.data(), data_buffer.size()).bitmap();
|
||||
} else {
|
||||
dbgln("Unknown clipboard type: {}", (u32)type);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue