ImageInfo

data class ImageInfo(val widthPx: Int, val heightPx: Int)

Intrinsic dimensions of an encoded image, in pixels.

Returned by readImageInfo when the supplied bytes carry a recognizable PNG or JPEG header. The library uses these to:

  1. Compute layout sizes for image(bytes) calls that omit one or both explicit dimensions (the missing axis is derived from the intrinsic aspect ratio).

  2. Skip a full image decode at layout time — the renderer only decodes later, on the platform side, when it actually needs to draw.

Constructors

Link copied to clipboard
constructor(widthPx: Int, heightPx: Int)

Properties

Link copied to clipboard

Intrinsic height in pixels.

Link copied to clipboard

Intrinsic width in pixels.