@UnstableApi
public final class BitmapUtil


Utility methods for Bitmap instances.

Summary

Public methods

static Bitmap
decode(byte[] data, int length, @Nullable BitmapFactory.Options options)

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

Public methods

decode

public static Bitmap decode(byte[] data, int length, @Nullable BitmapFactory.Options options)

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

Parameters
byte[] data

Byte array of compressed image data.

int length

The number of bytes to parse.

@Nullable BitmapFactory.Options options

the BitmapFactory.Options to decode the data with.

Throws
androidx.media3.common.ParserException

if the data could not be decoded.

java.io.IOException