public interface ImageHandler
PDFOptimizer
how to handle an image. An implementations of this interface should be registered
with OptSettings by calling OptSettings.setImageHandler(ImageHandler)
. When processing a document, the
convertImage(ImageInfo)
method will be called for each image found in the document.
The implementation can then look at the image properties, such as size, resolution and compression
to decide how to convert the image.Modifier and Type | Method and Description |
---|---|
ImageOutput |
convertImage(ImageInfo imageInfo)
This method is called for every image that
PDFOptimizer encounters to determine how the image should be optimized / converted. |
ImageOutput convertImage(ImageInfo imageInfo)
PDFOptimizer
encounters to determine how the image should be optimized / converted. The code in this method should look at the image properties
(color vs grayscale, resolution, image size) and decide how the image should be converted. The ImageOutput object returned by this method details the properties expected as an output.imageInfo
- All relevant current image properties.