@UnstableApi
class BitmapUtil


Utility methods for Bitmap instances.

Summary

Public functions

java-static Bitmap!
decode(
    data: ByteArray!,
    length: Int,
    options: BitmapFactory.Options?,
    maximumOutputDimension: Int
)

Decodes a Bitmap from a byte array using BitmapFactory and the .

Public functions

decode

java-static fun decode(
    data: ByteArray!,
    length: Int,
    options: BitmapFactory.Options?,
    maximumOutputDimension: Int
): Bitmap!

Decodes a Bitmap from a byte array using BitmapFactory and the .

Parameters
data: ByteArray!

Byte array of compressed image data.

length: Int

The number of bytes to parse.

options: BitmapFactory.Options?

The BitmapFactory.Options to decode the data with.

maximumOutputDimension: Int

The largest output Bitmap dimension that can be returned by this method, or LENGTH_UNSET if no limits are enforced.

Throws
androidx.media3.common.ParserException

if the data could not be decoded.

java.io.IOException