Image

interface Image : Media

Represents a picture.

Properties

Link copied to clipboard
abstract val creationDate: Long

The creation date of this piece of media, in milliseconds past the Unix Epoch.

Link copied to clipboard
abstract val extension: String

The file extension used when exporting the piece of media.

Link copied to clipboard
abstract val height: Int

The height of the piece of media.

Link copied to clipboard
abstract val name: String

The name of the piece of media.

Link copied to clipboard
open val size: Int

The size of the piece of media, or width x height.

Link copied to clipboard
abstract val width: Int

The width of the piece of media.

Functions

Link copied to clipboard
open fun alpha(x: Int, y: Int): Int

Gets the alpha portion for the pixel at the specified coordinates.

Link copied to clipboard
open fun blue(x: Int, y: Int): Int

Gets the blue portion for the pixel at the specified coordinates.

Link copied to clipboard
abstract operator fun get(x: Int, y: Int): Int

Gets the pixel color at specified coordinates in RGBA form.

Link copied to clipboard
open fun green(x: Int, y: Int): Int

Gets the green portion for the pixel at the specified coordinates.

Link copied to clipboard
open fun red(x: Int, y: Int): Int

Gets the red portion for the pixel color at the specified coordinates.

Link copied to clipboard
open fun to2DArray(): Array<IntArray>

Converts this image as a 2D array of pixel colors in RGBA format.

Link copied to clipboard
abstract fun toByteArray(): ByteArray

Gets this media as a byte array.