java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.scaling.DroppingAlgorithm
All Implemented Interfaces:
IScalingAlgorithm

public class DroppingAlgorithm extends Object implements IScalingAlgorithm
Scaling algorithm which drops pixels.
  • Constructor Details

    • DroppingAlgorithm

      public DroppingAlgorithm()
  • Method Details

    • scale

      public BitmapImagePixels scale (BitmapImagePixels original, double scaling)
      Scales a bitmap image by copying the nearest neighbor pixel of the original. As a result some pixels just dropped.
      Specified by:
      scale in interface IScalingAlgorithm
      Parameters:
      original - is an image to scale presented as BitmapImagePixels
      scaling - is a scaling coefficient. Should be in (0, 1] range
      Returns:
      scaled image