Loading...
Searching...
No Matches
pdftron::PDF::ImageSettings Class Reference

`#include <Optimizer.h>`

Inheritance diagram for pdftron::PDF::ImageSettings:

## Public Types
enum | CompressionMode { e_retain , e_flate , e_jpeg , e_jpeg2000 , e_none }
enum | DownsampleMode { e_off , e_default }

## Public Member Functions
| ImageSettings ()
void | SetImageDPI (double maximum, double resampling)
void | SetCompressionMode (enum CompressionMode mode)
void | SetDownsampleMode (enum DownsampleMode mode)
void | SetQuality (UInt32 quality)
void | ForceRecompression (bool force)
void | ForceChanges (bool force)

## Detailed Description

A class that stores downsampling/recompression settings for color and grayscale images.

Definition at line 78 of file Optimizer.h.

## Member Enumeration Documentation

## ◆ CompressionMode

enum pdftron::PDF::ImageSettings::CompressionMode

Enumerator
e_retain |
e_flate |
e_jpeg |
e_jpeg2000 |
e_none |

Definition at line 81 of file Optimizer.h.

## ◆ DownsampleMode

enum pdftron::PDF::ImageSettings::DownsampleMode

Enumerator
e_off |
e_default |

Definition at line 90 of file Optimizer.h.

## Constructor & Destructor Documentation

## ◆ ImageSettings()

pdftron::PDF::ImageSettings::ImageSettings | ( |  | ) |

create an ImageSettings object with default options

## Member Function Documentation

## ◆ ForceChanges()

void pdftron::PDF::ImageSettings::ForceChanges | ( | bool | force | ) |

Sets whether image changes that grow the PDF file should be kept. This is off by default.

Parameters

  force | if true all image changes will be kept.

## ◆ ForceRecompression()

void pdftron::PDF::ImageSettings::ForceRecompression | ( | bool | force | ) |

Sets whether recompression to the specified compression method should be forced when the image is not downsampled. By default the compression method for these images will not be changed.

Parameters

  force | if true the compression method for all images will be changed to the specified compression mode

## ◆ SetCompressionMode()

void pdftron::PDF::ImageSettings::SetCompressionMode | ( | enum CompressionMode | mode | ) |

Sets the output compression mode for this type of image The default value is e_retain

Parameters

  mode | the compression mode to set

## ◆ SetDownsampleMode()

void pdftron::PDF::ImageSettings::SetDownsampleMode | ( | enum DownsampleMode | mode | ) |

Sets the downsample mode for this type of image The default value is e_default which will allow downsampling of images

Parameters

  mode | the downsample mode to set

## ◆ SetImageDPI()

void pdftron::PDF::ImageSettings::SetImageDPI | ( | double | maximum,
|  | double | resampling )

Sets the maximum and resampling dpi for images. By default these are set to 144 and 96 respectively.

Parameters

  maximum | the highest dpi of an image before it will be resampled
  resampling | the image dpi to resample to if an image is encountered over the maximum dpi

## ◆ SetQuality()

void pdftron::PDF::ImageSettings::SetQuality | ( | UInt32 | quality | ) |

Sets the quality for lossy compression modes from 1 to 10 where 10 is lossless (if possible) the default value is 5

The documentation for this class was generated from the following file:

- PDF/Optimizer.h