Class BitmapScalingProcessor
java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.BitmapScalingProcessor
- All Implemented Interfaces:
-
IImageProcessor
Class is used to scale bitmap images.
-
Constructor Summary
ConstructorDescriptionBitmapScalingProcessor
(double scaling) Creates an instance of bitmap image processor.BitmapScalingProcessor
(double scaling, IScalingAlgorithm algorithm) Creates an instance of bitmap image processor. -
Method Summary
Modifier and TypeMethodDescriptioncom.itextpdf.kernel.pdf.xobject.PdfImageXObject
processImage
(com.itextpdf.kernel.pdf.xobject.PdfImageXObject objectToProcess, OptimizationSession session) Scales a bitmap image presented asPdfImageXObject
.
-
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
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 asPdfImageXObject
.- 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
-