1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibGfx: Make QOIWriter use ErrorOr

In addition to it now handling allocation failures, the encode() API is
now consistent with PNGWriter.
This commit is contained in:
Nico Weber 2023-03-12 09:05:25 -04:00 committed by Linus Groh
parent b698d64ee9
commit 9b297c634f
6 changed files with 62 additions and 52 deletions

View file

@ -380,7 +380,7 @@ ErrorOr<void> Mandelbrot::export_image(DeprecatedString const& export_path, Imag
encoded_data = TRY(Gfx::PNGWriter::encode(m_set.bitmap()));
break;
case ImageType::QOI:
encoded_data = Gfx::QOIWriter::encode(m_set.bitmap());
encoded_data = TRY(Gfx::QOIWriter::encode(m_set.bitmap()));
break;
default:
VERIFY_NOT_REACHED();