Class MultiPageImageExtractor

java.lang.Object
io.scanbot.sdk.multipageimageextractor.MultiPageImageExtractor
All Implemented Interfaces:
AutoCloseable

public class MultiPageImageExtractor extends Object implements AutoCloseable
API for extracting images from multi-page images (PDF, TIFF) and single-page images (JPEG, PNG). Required licence feature(s): ImageProcessing.
  • Constructor Details

    • MultiPageImageExtractor

      public MultiPageImageExtractor()
      Constructs MultiPageImageExtractor with the given params.
  • Method Details

    • run

      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
      IOException - If an input/output error occurs
    • close

      public void close()
      Closes native resources held by the object.
      Specified by:
      close in interface AutoCloseable
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable