Class DroppingAlgorithm
java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.scaling.DroppingAlgorithm
- All Implemented Interfaces:
-
IScalingAlgorithm
Scaling algorithm which drops pixels.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionscale
(BitmapImagePixels original, double scaling) Scales a bitmap image by copying the nearest neighbor pixel of the original.
-
Constructor Details
-
DroppingAlgorithm
public DroppingAlgorithm()
-
-
Method Details
-
scale
Scales a bitmap image by copying the nearest neighbor pixel of the original. As a result some pixels just dropped.- Specified by:
-
scale
in interfaceIScalingAlgorithm
- Parameters:
-
original
- is an image to scale presented asBitmapImagePixels
-
scaling
- is a scaling coefficient. Should be in (0, 1] range - Returns:
- scaled image
-