\includegraphics{plot} against the file map, the way graphicx resolves a
name: the bare name first, then each extension the driver knows.
Object.prototype.hasOwnProperty rather than path in files or a truthiness
test, because files is a plain object a caller built: \includegraphics {constructor} would otherwise "find" a function on Object.prototype.
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.