bitmap

fun bitmap(): Bitmap?

Converts the Base64-encoded QR code content to a displayable Bitmap.

This method:

  1. Extracts the Base64 data from the content string (after "base64,")

  2. Decodes the Base64 string to a byte array

  3. Converts the byte array to a Bitmap using BitmapFactory

Content Format

The method expects content to be in data URI format:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...

The substring after "base64," is extracted and decoded.

Return

A Bitmap representation of the QR code, or null if decoding fails

See also