android-components / mozilla.components.browser.icons.decoder / AndroidIconDecoder / decode


fun decode(data: ByteArray, desiredSize: DesiredSize): <ERROR CLASS>? (source)

Overrides IconDecoder.decode

Decodes the given data into a a Bitmap or null.

The caller provides a maximum size. This is useful for image formats that may decode into multiple images. The decoder can use this size to determine which Bitmap to return.