Class ImageProcessingUtil
java.lang.Object
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.utils.ImageProcessingUtil
Helper class which encapsulates util method for image processing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
compressJpeg
(byte[] originalJpeg, double compressionLevel) Applies JPEG compression to the provided byte array with the provided compression level.
-
Method Details
-
compressJpeg
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
-