mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 18:31:13 +00:00
image: Make the ppm writing code a tiny bit shorter
This commit is contained in:
parent
fbc70eca93
commit
76d8e5d866
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/nico
Commit: 76d8e5d866
Pull-request: https://github.com/SerenityOS/serenity/pull/17863
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue