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

public class BitmapIndexer extends Object implements IImageProcessor
Class is used to make the color space of the image indexed if possible.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 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