ImageXObject

An XObject Image extracted from a /XObject resource entry (ISO 32000-1 §8.9.5).

The decoded byte buffer's interpretation depends on the filter chain:

  • DCTDecode → JPEG file in encodedBytes; decoded by the host platform's image loader (see ImageDecoder in :kitepdf-compose).

  • FlateDecode → raw pixel data already inflated; pixelBytes gives the pre-decoded buffer in DeviceRGB / DeviceGray order according to colorSpace and bitsPerComponent.

  • CCITTFaxDecode, JBIG2Decode, JPXDecode — recognised but not decoded yet; encodedBytes holds the raw payload.

Callers should switch on kind to pick the right rendering path.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Encoded bytes — for kinds that defer decoding to a platform image loader.

Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
val pixelBytes: ByteArray? = null

Pixel bytes — only populated for Kind.RAW.

Link copied to clipboard

Soft-mask alpha (ISO 32000-1 §11.6.5.2), normalised to 8-bit grayscale — one byte per pixel, 0 = transparent, 255 = opaque, row-major over softMaskWidth×softMaskHeight. Null when the image carries no /SMask.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard

Assemble a Kind.RAW image's already-inflated samples into a flat RGBA8888 buffer (R,G,B,A per pixel, row-major, no padding) that a platform backend can wrap in a bitmap.