Package-level declarations

Types

Link copied to clipboard
class GrayImage(val width: Int, val height: Int, val data: ByteArray)

A packed 8-bit single-channel image.

Link copied to clipboard
actual object ImageDecoder

Decodes encoded image files (JPEG, PNG, ...) into an RgbImage using the platform's native codec.

expect object ImageDecoder

Decodes encoded image files (JPEG, PNG, ...) into an RgbImage using the platform's native codec.

actual object ImageDecoder

Decodes encoded image files (JPEG, PNG, ...) into an RgbImage using the platform's native codec.

actual object ImageDecoder

Decodes encoded image files (JPEG, PNG, ...) into an RgbImage using the platform's native codec.

Link copied to clipboard
class RgbImage(val width: Int, val height: Int, val data: ByteArray)

An immutable-by-convention, packed 8-bit RGB image (R,G,B,R,G,B,..., row-major, no row padding).

Functions

Link copied to clipboard

Copies this bitmap's pixels into an RgbImage. The bitmap is not recycled.

Link copied to clipboard
fun RgbImage.warpPerspective(quad: Quad, outWidth: Int, outHeight: Int): RgbImage

Perspective-corrects the region bounded by quad into an upright outWidth x outHeight image (the top-left corner of quad becomes the output's top-left, and so on clockwise).

Link copied to clipboard
fun RgbImage.warpSimilarity(transform: SimilarityTransform, outWidth: Int, outHeight: Int): RgbImage

Applies transform (source -> output coordinates) and renders an outWidth x outHeight image.