Companion
object Companion
Functions
Link copied to clipboard
fun from(stream: PdfStream, refs: IndirectResolver? = null, fillColor: RgbColor? = null): KiteImageData
Pull a stream from a /XObject /Image resource entry into a KiteImageData. refs (when provided) resolves indirect /ColorSpace, /SMask and /Mask references; fillColor tints /ImageMask stencils (pass the current graphics-state fill colour).
fun from(stream: PdfStream, refs: IndirectResolver?, fillColor: RgbColor?, colorSpace: KiteColorSpace?): KiteImageData
Decode an inline image with its resource colorSpace already resolved. Unlike image XObjects, inline images may name a colour space in the current resource dictionary (ISO 32000-1, 8.9.7). Null keeps the normal stream-dictionary lookup; stencil masks still use fillColor.
Link copied to clipboard
Build an image from a self-contained encoded file, as shipped by EPUB / CBZ / SVG <image> (rather than pulled from a PDF /XObject stream). The format and pixel dimensions are sniffed from the bytes.