Class BitmapIndexer
java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.BitmapIndexer
- All Implemented Interfaces:
-
IImageProcessor
Class is used to make the color space of the image indexed if possible.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.itextpdf.kernel.pdf.xobject.PdfImageXObject
processImage
(com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session) Calculates the number of colors used for the image and if it is not more than 256 builds an index for the image and change the color space to Indexed.
-
Constructor Details
-
BitmapIndexer
public BitmapIndexer()
-
-
Method Details
-
processImage
public com.itextpdf.kernel.pdf.xobject.PdfImageXObject processImage(com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session) Calculates the number of colors used for the image and if it is not more than 256 builds an index for the image and change the color space to Indexed.- 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
-