mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibGfx: Change BMPWriter API to be consistent with other image writers
This commit is contained in:
parent
01387eb72b
commit
f1a3028ef1
6 changed files with 15 additions and 12 deletions
|
@ -27,8 +27,7 @@
|
|||
static ErrorOr<ByteBuffer> dump_bitmap(RefPtr<Gfx::Bitmap> bitmap, AK::StringView extension)
|
||||
{
|
||||
if (extension == "bmp") {
|
||||
Gfx::BMPWriter dumper;
|
||||
return dumper.dump(bitmap);
|
||||
return Gfx::BMPWriter::encode(*bitmap);
|
||||
} else if (extension == "png") {
|
||||
return Gfx::PNGWriter::encode(*bitmap);
|
||||
} else if (extension == "qoi") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue