Class ImageQualityOptimizer
- Namespace
- SoftZenPdf.Optimizer
- Assembly
- SoftZenPdf.Optimizer.dll
Optimizes the images in a document with the processor set for each kind of image. Each image is replaced only when the processed version is smaller; what happened to every image is reported in Images.
public sealed class ImageQualityOptimizer : OptimizationHandler
- Inheritance
-
ImageQualityOptimizer
- Inherited Members
Examples
optimizer.AddOptimizationHandler(new ImageQualityOptimizer
{
JpegProcessor = new JpegCompressor(0.5f),
BitmapProcessor = new BitmapCompressor()
});
Properties
- BitmapProcessor
What to do with bitmap images, stored with Flate, LZW or run-length compression or not compressed at all: BitmapCompressor to compress them losslessly, or BitmapToJpegConverter to turn photographs into JPEG. null leaves them alone.
- JpegProcessor
What to do with JPEG (DCTDecode) images; null leaves them alone.