ImagenInlineImage

@PublicPreviewAPI
class ImagenInlineImage


Represents an Imagen-generated image that is returned as inline data.

Summary

Public functions

Bitmap

Returns the image as an Android OS native Bitmap so that it can be saved or sent to the UI.

Public properties

ByteArray

The raw image bytes in JPEG or PNG format, as specified by mimeType.

String

The IANA standard MIME type of the image data; either "image/png" or "image/jpeg"; to request a different format, see ImagenGenerationConfig.imageFormat.

Public functions

asBitmap

fun asBitmap(): Bitmap

Returns the image as an Android OS native Bitmap so that it can be saved or sent to the UI.

Public properties

data

val dataByteArray

The raw image bytes in JPEG or PNG format, as specified by mimeType.

mimeType

val mimeTypeString

The IANA standard MIME type of the image data; either "image/png" or "image/jpeg"; to request a different format, see ImagenGenerationConfig.imageFormat.