mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
image: Make the ppm writing code a tiny bit shorter
This commit is contained in:
parent
fbc70eca93
commit
76d8e5d866
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