ResourceBuilders.InlineImageResource


@RequiresSchemaVersion(major = 1, minor = 0)
class ResourceBuilders.InlineImageResource


An image resource whose data is fully inlined, with no dependency on a system or app resource.

Summary

Public functions

ByteArray<Byte>

Gets the byte array representing the image.

Int

Gets the format of the byte array data representing the image.

@Dimension(unit = 1) Int

Gets the native height of the image, in pixels.

@Dimension(unit = 1) Int

Gets the native width of the image, in pixels.

String

Public functions

getData

Added in 1.0.0
fun getData(): ByteArray<Byte>

Gets the byte array representing the image.

getFormat

Added in 1.0.0
fun getFormat(): Int

Gets the format of the byte array data representing the image. May be left unspecified or set to IMAGE_FORMAT_UNDEFINED in which case the platform will attempt to extract this from the raw image data. If the platform does not support the format, the image will not be decoded or displayed.

getHeightPx

Added in 1.0.0
fun getHeightPx(): @Dimension(unit = 1) Int

Gets the native height of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

getWidthPx

Added in 1.0.0
fun getWidthPx(): @Dimension(unit = 1) Int

Gets the native width of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

toString

fun toString(): String