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 (seeImageDecoderin: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
Properties
Encoded bytes — for kinds that defer decoding to a platform image loader.
Pixel bytes — only populated for Kind.RAW.
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.
Functions
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.