1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

LibGfx: Allow passing an ideal size to image decoders

The ideal size is the size the user will display the image. Raster
formats should ignore this parameter, but vector formats can use
it to generate a bitmap of the ideal size.
This commit is contained in:
MacDue 2023-07-02 22:20:06 +01:00 committed by Jelle Raaijmakers
parent ff47223301
commit e7cddda7e1
20 changed files with 22 additions and 22 deletions

View file

@ -212,7 +212,7 @@ ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> QOIImageDecoderPlugin::create(Readonl
return adopt_nonnull_own_or_enomem(new (nothrow) QOIImageDecoderPlugin(move(stream)));
}
ErrorOr<ImageFrameDescriptor> QOIImageDecoderPlugin::frame(size_t index)
ErrorOr<ImageFrameDescriptor> QOIImageDecoderPlugin::frame(size_t index, Optional<IntSize>)
{
if (index > 0)
return Error::from_string_literal("Invalid frame index");