Class BitmapCompressor

Namespace
SoftZenPdf.Optimizer
Assembly
SoftZenPdf.Optimizer.dll

Compresses bitmap images losslessly: every pixel decodes to exactly the colour it had before. RGB images whose pixels are all grey are stored as greyscale, images with few colours are stored as a palette (1, 2, 4 or 8 bits per pixel), sample values that fit a smaller bit depth exactly are stored with fewer bits, and the result is Deflate-compressed with PNG predictors when that is smaller. Images whose /Decode array or colour-key mask gives their sample values a meaning of their own are only recompressed, and images whose soft mask has a /Matte colour (given in the image's own colour space) keep their colour space.

public sealed class BitmapCompressor : ImageProcessor
Inheritance
BitmapCompressor
Inherited Members

Properties

ReduceColorDepth

Store RGB images whose pixels are all grey as greyscale, and use fewer bits per sample where the values allow it exactly. Defaults to true.

UsePalette

Store images with at most 256 colours as an indexed (palette) image. Defaults to true.