THE OTHER HALF OF THE SEAM, split out because pdf/render.ts needs it
too: bytes in, intrinsic size out, with no page design involved.
Diagnostics are attributed to the image file, whole-file, because that is
the only position this function knows; every message names path, and
placeImage re-homes them onto the \includegraphics line. Returns null
after reporting an error; never throws.
Images (landed).
decodeImageandimageStreamare the two halves — bytes to an intrinsic size, and that size to a PDFXObjectdescription — 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.