Class JpegCompressor

Namespace
SoftZenPdf.Optimizer
Assembly
SoftZenPdf.Optimizer.dll

Recompresses JPEG images at a chosen quality. Colours are kept exactly as the PDF defines them: grey and RGB images are stored as JFIF (RGB as YCbCr), CMYK images as stored, keeping an Adobe marker if the original had one, and the image's colour space, /Decode array and masks are left unchanged.

public sealed class JpegCompressor : ImageProcessor
Inheritance
JpegCompressor
Inherited Members

Constructors

JpegCompressor(float)

Creates a JPEG compressor.

Properties

Quality

The quality, greater than 0 and at most 1.

SkipLowerQualityImages

Leave JPEGs alone when they were already saved at this quality or lower, since recompressing them would only lose detail for little or no saving. Defaults to true.

SubsampleChroma

Store the colour detail of RGB images at half resolution (4:2:0), as most cameras and image editors do. Saves a lot on photographs; turn it off for images with fine coloured text or lines. Defaults to true.