run
public PageExtractionResult run(RandomAccessSource source)
throws InvalidDataException,
InvalidImageRefException,
LicenseException,
java.io.IOException
Extracts images from the given source. If possible, images that are originally stored in a compressed way, are not decompressed automatically but are initialized in a lazy way.
This means that the image data is only decompressed when it is accessed for the first time.
That's why when the images are used after extraction, it is recommended to close (dispose) (if platform uses Garbage Collector) images as soon as they are not needed anymore to prevent storing a lot of images in decompressed state in memory.
After the method is executed, the source doesn't have to exist anymore.
- Parameters:
source - The source to extract images from. Supported multi-page image formats are TIFF and PDF. Supported single page image formats are JPEG and PNG.
- Returns:
- The result of the extraction.
- Throws:
InvalidDataException - If input data is invalid
InvalidImageRefException - If an invalid image reference is used
LicenseException - If license requirements for the API are not met
java.io.IOException - If an input/output error occurs