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


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

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.