Class BitmapScalingProcessor

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

public class BitmapScalingProcessor extends Object implements IImageProcessor
Class is used to scale bitmap images.
  • Constructor Details

    • BitmapScalingProcessor

      public BitmapScalingProcessor (double scaling)
      Creates an instance of bitmap image processor. AverageCalculationAlgorithm will be used as scaling algorithm.
      Parameters:
      scaling - is a scaling coefficient
    • BitmapScalingProcessor

      public BitmapScalingProcessor (double scaling, IScalingAlgorithm algorithm)
      Creates an instance of bitmap image processor.
      Parameters:
      scaling - is a scaling coefficient
      algorithm - is a scaling algorithm
  • Method Details

    • processImage

      public com.itextpdf.kernel.pdf.xobject.PdfImageXObject processImage (com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session)
      Scales a bitmap image presented as PdfImageXObject.
      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