Click or drag to resize
Pdftools logo

ImageRecompressionOptions Class

The parameters for image recompression

Inheritance Hierarchy
SystemObject
  PdfTools.InternalNativeBase
    PdfTools.InternalNativeObject
      PdfTools.OptimizationImageRecompressionOptions

Namespace: PdfTools.Optimization
Assembly: PdfTools (in PdfTools.dll) Version: 1.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public class ImageRecompressionOptions : NativeObject

The ImageRecompressionOptions type exposes the following members.

Properties
 NameDescription
Public propertyAlgorithmSelection

The strategy for image recompression

For each image to be recompressed, a specific choice of compression algorithms are tried. The selection of algorithms depends on this strategy, the type of the optimizer profile (e.g. Web), the color space of the image, and CompressionQuality. The image is recompressed using the algorithm resulting in the smallest output file.

Refer to CompressionAlgorithmSelection for more information on strategies.

Default:

Public propertyCompressionQuality

The compression quality for lossy image compression algorithms

This property specifies the compression quality for the JPEG and JPEG2000 image compression algorithms. Valid values are between 0 (lowest quality) and 1 (highest quality).

Although the JBIG2 algorithm for bi-tonal images also allows lossy compression, it is not influenced by this property. The JBIG2 compression quality is fixed at 1 (lossless).

Default:

Public propertyReduceColorComplexity

Enable color complexity reduction.

When enabled, the software analyzes images that utilize device color spaces (DeviceRGB, DeviceCMYK, or DeviceGray) as well as indexed images with a device color space as their base. If applicable, the images are converted according to the following criteria:
  • Images in DeviceRGB or DeviceCMYK color space where all pixels are gray will be converted to grayscale using the DeviceGray color space.
  • Images containing only black and white pixels will be converted to bitonal images.
  • Images where all pixels are of the same color will be downsampled to a single pixel.
Additionally, image masks and soft masks are optimized in the following ways:
  • Soft masks consisting only of black and white pixels will be converted into a standard mask.
  • Any (soft) mask that is completely opaque will be removed.
Default:
Top
Methods
 NameDescription
Public methodEquals
(Inherited from NativeObject)
Public methodGetHashCode
(Inherited from NativeObject)
Top
See Also