Class CombinedImageProcessor

java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.CombinedImageProcessor
All Implemented Interfaces:
IImageProcessor

public class CombinedImageProcessor extends Object implements IImageProcessor
Allow to create complex IImageProcessor combined of several image processors called one by one.
  • Constructor Details

    • CombinedImageProcessor

      public CombinedImageProcessor()
      Creates a new instance of the combined image processor.
  • Method Details

    • addProcessor

      public CombinedImageProcessor addProcessor (IImageProcessor processor)
      Appends one more processor to the chain.
      Parameters:
      processor - is a new processor to add.
      Returns:
      this instance
    • processImage

      public com.itextpdf.kernel.pdf.xobject.PdfImageXObject processImage (com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session) throws IOException
      Processes image by set processors one by one.
      Specified by:
      processImage in interface IImageProcessor
      Parameters:
      objectToProcess - is a PdfImageXObject representing the image
      session - is an auxiliary object used to support share data between stages of optimization process
      Returns:
      processed image if processing can be performed and the same instance otherwise
      Throws:
      IOException - if one of included processors throws an exception