Class CombinedImageProcessor
java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.CombinedImageProcessor
- All Implemented Interfaces:
-
IImageProcessor
Allow to create complex
IImageProcessor
combined of several image processors called one by one.
-
Constructor Summary
ConstructorDescriptionCreates a new instance of the combined image processor. -
Method Summary
Modifier and TypeMethodDescriptionaddProcessor
(IImageProcessor processor) Appends one more processor to the chain.com.itextpdf.kernel.pdf.xobject.PdfImageXObject
processImage
(com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session) Processes image by set processors one by one.
-
Constructor Details
-
CombinedImageProcessor
public CombinedImageProcessor()Creates a new instance of the combined image processor.
-
-
Method Details
-
addProcessor
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 interfaceIImageProcessor
- Parameters:
-
objectToProcess
- is aPdfImageXObject
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
-