1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:47:47 +00:00

ImageDecoder: Add plumbing to allow a client to request an ideal size

This is only used for vector graphics format where requesting the true
displayed size leads to visual enhancement.
This commit is contained in:
Lucas CHOLLET 2023-12-23 13:56:23 -05:00 committed by Andreas Kling
parent 4c23f0e142
commit e56eb11dee
7 changed files with 13 additions and 13 deletions

View file

@ -57,7 +57,7 @@ ErrorOr<NonnullRefPtr<Gfx::Bitmap>> Image::decode_bitmap(ReadonlyBytes bitmap_da
auto optional_mime_type = guessed_mime_type.map([](auto mime_type) { return mime_type.to_byte_string(); });
// FIXME: Find a way to avoid the memory copying here.
auto maybe_decoded_image = client->decode_image(bitmap_data, optional_mime_type);
auto maybe_decoded_image = client->decode_image(bitmap_data, OptionalNone {}, optional_mime_type);
if (!maybe_decoded_image.has_value())
return Error::from_string_literal("Image decode failed");