BitmapFactoryImageDecoder.BitmapDecoder


@VisibleForTesting(otherwise = 2)
interface BitmapFactoryImageDecoder.BitmapDecoder


A functional interface for turning byte arrays into bitmaps.

Summary

Public functions

Bitmap!
decode(data: ByteArray!, length: Int)

Decodes data into a Bitmap.

Public functions

decode

fun decode(data: ByteArray!, length: Int): Bitmap!

Decodes data into a Bitmap.

Parameters
data: ByteArray!

An array holding the data to be decoded, starting at position 0.

length: Int

The length of the input to be decoded.

Returns
Bitmap!

The decoded Bitmap.

Throws
androidx.media3.exoplayer.image.ImageDecoderException

If a decoding error occurs.