Image

interface Image

An image that can be drawn on a canvas.

Inheritors

Properties

Link copied to clipboard
abstract val height: Int

The intrinsic height of the image in pixels or -1 if the image has no intrinsic height.

Link copied to clipboard
abstract val shareable: Boolean

True if the image can be shared between multiple Targets at the same time.

Link copied to clipboard
abstract val size: Long

The size of the image in memory in bytes.

Link copied to clipboard
abstract val width: Int

The intrinsic width of the image in pixels or -1 if the image has no intrinsic width.

Functions

Link copied to clipboard
abstract fun draw(canvas: Canvas)

Draw the image to a Canvas.

Link copied to clipboard
expect fun Image.toBitmap(width: Int = this.width, height: Int = this.height): Bitmap

Convert an Image into a Bitmap.

actual fun Image.toBitmap(width: Int, height: Int): Bitmap
fun Image.toBitmap(width: Int, height: Int, colorType: ColorType, colorAlphaType: ColorAlphaType, colorSpace: ColorSpace?): Bitmap