mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
image: Make the ppm writing code a tiny bit shorter
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/76d8e5d866 Pull-request: https://github.com/SerenityOS/serenity/pull/17863
@@ -48,7 +48,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
bytes = TRY(Gfx::PNGWriter::encode(*frame, { .icc_data = icc_data }));
|
||||
} else if (out_path.ends_with(".ppm"sv, CaseSensitivity::CaseInsensitive)) {
|
||||
auto const format = ppm_ascii ? Gfx::PortableFormatWriter::Options::Format::ASCII : Gfx::PortableFormatWriter::Options::Format::Raw;
|
||||
bytes = TRY(Gfx::PortableFormatWriter::encode(*frame, Gfx::PortableFormatWriter::Options { .format = format }));
|
||||
bytes = TRY(Gfx::PortableFormatWriter::encode(*frame, { .format = format }));
|
||||
} else if (out_path.ends_with(".qoi"sv, CaseSensitivity::CaseInsensitive)) {
|
||||
bytes = TRY(Gfx::QOIWriter::encode(*frame));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user