1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

LibGfx: Change BMPWriter API to be consistent with other image writers

This commit is contained in:
Nico Weber 2023-03-12 12:09:29 -04:00 committed by Jelle Raaijmakers
parent 01387eb72b
commit f1a3028ef1
6 changed files with 15 additions and 12 deletions

View file

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
ByteBuffer bytes;
if (out_path.ends_with(".bmp"sv, CaseSensitivity::CaseInsensitive)) {
bytes = Gfx::BMPWriter().dump(frame);
bytes = TRY(Gfx::BMPWriter::encode(*frame));
} else if (out_path.ends_with(".png"sv, CaseSensitivity::CaseInsensitive)) {
bytes = TRY(Gfx::PNGWriter::encode(*frame));
} else if (out_path.ends_with(".qoi"sv, CaseSensitivity::CaseInsensitive)) {