HeadlessImage

sealed interface HeadlessImage(source)

An immutable, thread-safe row-major physical ARGB image produced by headless rendering.

The implementation owns its pixel storage and exposes no mutable backing array or construction hook. Image reads and fresh output copies are safe from any thread after construction. Coordinates are physical pixels with a top-left origin.

Properties

Link copied to clipboard
abstract val size: IntSize

The positive physical image extent.

Functions

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

Returns one physical pixel without changing the image.

Link copied to clipboard
abstract fun copyArgb(): IntArray

Returns a fresh row-major copy of all physical ARGB pixels.

Link copied to clipboard
abstract fun encodePng(): ByteArray

Encodes the image as deterministic PNG bytes.