java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.utils.ImageProcessingUtil

public final class ImageProcessingUtil extends Object
Helper class which encapsulates util method for image processing.
  • Method Details

    • compressJpeg

      public static byte[] compressJpeg (byte[] originalJpeg, double compressionLevel) throws IOException
      Applies JPEG compression to the provided byte array with the provided compression level.
      Parameters:
      originalJpeg - is the array of bytes representing the original JPEG image
      compressionLevel - is a compression level
      Returns:
      new array of bytes representing compressed JPEG image
      Throws:
      IOException - if any input/output error occurs