getAsBitmap

fun getAsBitmap(options: BitmapFactory.Options = DEFAULT_DECODE_OPTIONS): Bitmap?

Decodes the PNG data into a Bitmap object using the specified decoding options.

By default, the bitmap is decoded with the Bitmap.Config.RGB_565 configuration to optimize memory usage. Custom options can be provided via the options parameter to control the decoding behavior.

Return

A Bitmap object if decoding is successful, or null if the data cannot be decoded.

Parameters

options

A BitmapFactory.Options object to customize the decoding process. Defaults to Bitmap.Config.RGB_565 configuration.