diff options
author | Nico Weber <thakis@chromium.org> | 2023-03-12 09:05:25 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-12 13:23:34 +0000 |
commit | 9b297c634f82479f3b6851b77f9af9e1486c4546 (patch) | |
tree | cb566f3d3fcb592a496ab562c3df4bd11165dbc9 /Userland/Utilities/image.cpp | |
parent | b698d64ee9161ae107d2f8fd783b04efe0bb1f59 (diff) | |
download | serenity-9b297c634f82479f3b6851b77f9af9e1486c4546.zip |
LibGfx: Make QOIWriter use ErrorOr
In addition to it now handling allocation failures, the encode() API is
now consistent with PNGWriter.
Diffstat (limited to 'Userland/Utilities/image.cpp')
-rw-r--r-- | Userland/Utilities/image.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/image.cpp b/Userland/Utilities/image.cpp index fa105303b9..e53814f992 100644 --- a/Userland/Utilities/image.cpp +++ b/Userland/Utilities/image.cpp @@ -42,7 +42,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } 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)) { - bytes = Gfx::QOIWriter::encode(*frame); + bytes = TRY(Gfx::QOIWriter::encode(*frame)); } else { warnln("can only write .bmp, .png, and .qoi"); return 1; |