Companion

object Companion

Functions

Link copied to clipboard
fun from(stream: PdfStream, refs: IndirectResolver? = null, fillColor: RgbColor? = null): ImageXObject

Pull a stream from a /XObject /Image resource entry into an ImageXObject. refs (when provided) resolves indirect /ColorSpace, /SMask and /Mask references; fillColor tints /ImageMask stencils (pass the current graphics-state fill colour).

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.