An *image loader* is used for loading an image and creating a suitable
Implementation of an Image Loader¶ ↑
Each image loader is a (stateless) object (normally a module) that responds to two methods:
trueif the given file or IO stream can be handled by the loader, i.e. if the content contains a suitable image.
- load(document, file_or_io)
Should add a new image XObject to the document that uses the file or IO stream as source and return this newly created object. This method is only invoked if handles? has returned
truefor the same
The image XObject may use any implemented filter. For example, an image loader for
JPEG files would typically use the DCTDecode filter instead of decoding the image itself.
See: PDF1.7 s8.9