Skip to content

Support decoding images at any requested size in ImageDecoderImpeller #104217

@bdero

Description

@bdero

ImageDecoderImpeller currently attempts to decode images using whatever target size is requested by the framework, but often times codecs (for example, the PNG SkCodec) can't decode into buffers of arbitrary sizes relative to the original image size. So in this situation, the codec rejects the attempt at decoding.

ImageDecoderSkia handles this situation by asking the codec to render at the closest resolution supported by the codec, and then proceeds to scale down the decoded image further if necessary: https://github.com/flutter/engine/blob/af2edb6e987f00d408e392f4f68535e7e17d2d8a/lib/ui/painting/image_decoder_skia.cc#L111-L157

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions