mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +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:
parent
b698d64ee9
commit
9b297c634f
6 changed files with 62 additions and 52 deletions
|
@ -196,7 +196,7 @@ ErrorOr<void> Image::export_qoi_to_file(NonnullOwnPtr<Stream> stream) const
|
|||
{
|
||||
auto bitmap = TRY(compose_bitmap(Gfx::BitmapFormat::BGRA8888));
|
||||
|
||||
auto encoded_data = Gfx::QOIWriter::encode(bitmap);
|
||||
auto encoded_data = TRY(Gfx::QOIWriter::encode(bitmap));
|
||||
TRY(stream->write_entire_buffer(encoded_data));
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue