#include <Optimizer.h>
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) |
A class that stores downsampling/recompression settings for color and grayscale images.
Definition at line 78 of file Optimizer.h.
Enumerator | |
---|---|
e_retain | |
e_flate | |
e_jpeg | |
e_jpeg2000 | |
e_none |
Definition at line 81 of file Optimizer.h.
Enumerator | |
---|---|
e_off | |
e_default |
Definition at line 90 of file Optimizer.h.
pdftron::PDF::ImageSettings::ImageSettings | ( | ) |
create an ImageSettings object with default options
void pdftron::PDF::ImageSettings::ForceChanges | ( | bool | force | ) |
Sets whether image changes that grow the PDF file should be kept. This is off by default.
force | if true all image changes will be kept. |
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.
force | if true the compression method for all images will be changed to the specified compression mode |
void pdftron::PDF::ImageSettings::SetCompressionMode | ( | enum CompressionMode | mode | ) |
Sets the output compression mode for this type of image The default value is e_retain
mode | the compression mode to set |
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
mode | the downsample mode to set |
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.
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 |
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