Atrium — shared contracts and the typesetting engine
    Preparing search index...

    Function imageStream

    Images (landed). decodeImage and imageStream are the two halves — bytes to an intrinsic size, and that size to a PDF XObject description — and both are exported because they are separately testable and separately useful: a caller can ask how big a figure is without laying out a document.

    • The XObject for a decoded image.

      Only ever called with an image decodeImage accepted, so anything unrepresentable here is an engine bug rather than a bad document: it throws, and renderPdf's catch turns it into an internal diagnostic. That is the right split — a document's fault is a diagnostic at layout time with a line number, and a fault of ours is not something to paper over at emission time.

      Parameters

      Returns ImageStream