Foxit PDF SDK
|
Public Types | |
enum | MonoImageCompressMode { e_ImageCompressCCITT3 = 10001, e_ImageCompressCCITT4 = 10002, e_ImageCompressHigh = 10003, e_ImageCompressjbig2 = 10004, e_ImageCompressRetain = 10007, e_ImageCompressRunLength = 10008 } |
Enumeration for compression mode used for monochrome image. More... | |
enum | MonoImageCompressQuality { e_ImageCompressQualityLossless = 1, e_ImageCompressQualityLossy = 2 } |
Enumeration for compression quality used for monochrome image. More... | |
enum | StretchMode { e_StretchDefault = -1, e_StretchOff = 0x00, e_StretchInterpol = 0x20, e_StretchDownsample = 0x04, e_StretchBicubic = 0x80, e_StretchNoSmooth = 0x100 } |
Enumeration for stretch mode. More... | |
Public Member Functions | |
MonoImageSettings () | |
Constructor. More... | |
MonoImageSettings (const MonoImageSettings &other) | |
Constructor, with another result information object. More... | |
~MonoImageSettings () | |
Destructor. | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator!= (const MonoImageSettings &other) const |
Not equal operator. More... | |
MonoImageSettings & | operator= (const MonoImageSettings &other) |
Assign operator. More... | |
bool | operator== (const MonoImageSettings &other) const |
Equal operator. More... | |
void | SetCompressionMode (MonoImageCompressMode mode) |
Set compression mode used for optimizing monochrome images in a PDF document. More... | |
void | SetImageDPI (int32 dpi) |
Set the DPI value as the target compressed value for compressing monochrome images in a PDF document. More... | |
void | SetImageDPILimit (int dpi_limit) |
Set the lower limit DPI value for the monochrome image to decide if the image is to be compressed in a PDF document. More... | |
void | SetQuality (MonoImageCompressQuality quality) |
Set compression quality, used for optimizing monochrome images in a PDF document. More... | |
void | SetStretchMode (StretchMode mode) |
Set stretch mode used for optimizing monochrome images in a PDF document. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class represents downsampling/recompression settings for monochrome images. This class object can be set to class OptimizerSettings and then be used to optimize a PDF document.
Enumeration for compression mode used for monochrome image.
Values of this enumeration should be used alone.
Enumeration for stretch mode.
Values of this enumeration should be used alone.
foxit::addon::optimization::MonoImageSettings::MonoImageSettings | ( | ) |
Constructor.
This constructor is to construct a monochrome image settings object with default setting options. User can also call "set" methods in this class to change these setting options. Please refer to comment of these "set" methods for more details about default values.
foxit::addon::optimization::MonoImageSettings::MonoImageSettings | ( | const MonoImageSettings & | other | ) |
Constructor, with another result information object.
[in] | other | Another monochrome image settings object. |
bool foxit::addon::optimization::MonoImageSettings::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::addon::optimization::MonoImageSettings::operator!= | ( | const MonoImageSettings & | other | ) | const |
Not equal operator.
[in] | other | Another monochrome image settings object. This function will check if current object is not equal to this one. |
MonoImageSettings& foxit::addon::optimization::MonoImageSettings::operator= | ( | const MonoImageSettings & | other | ) |
Assign operator.
[in] | other | Another monochrome image settings object, whose value would be assigned to current object. |
bool foxit::addon::optimization::MonoImageSettings::operator== | ( | const MonoImageSettings & | other | ) | const |
Equal operator.
[in] | other | Another monochrome image settings object. This function will check if current object is equal to this one. |
void foxit::addon::optimization::MonoImageSettings::SetCompressionMode | ( | MonoImageCompressMode | mode | ) |
Set compression mode used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set option, that means to use MonoImageSettings::e_ImageCompressCCITT4 as the default value of this option.
[in] | mode | Image compression mode. Please refer to values starting from MonoImageSettings::e_ImageCompressHigh and this should be one of these values. |
void foxit::addon::optimization::MonoImageSettings::SetImageDPI | ( | int32 | dpi | ) |
Set the DPI value as the target compressed value for compressing monochrome images in a PDF document.
When an image can be compressed, the resolution of this image will be compressed to the DPI value set by current function.
For a newly constructed object, if this function is not called to set option, that means to use 250 as the default value of this option.
[in] | dpi | DPI value. If the images can be compressed, the resolution of these images will be compressed to this value. |
void foxit::addon::optimization::MonoImageSettings::SetImageDPILimit | ( | int | dpi_limit | ) |
Set the lower limit DPI value for the monochrome image to decide if the image is to be compressed in a PDF document.
If the resolution of an image in the PDF document is above the lower limit DPI value, this image will be compressed to the target compressed DPI value which is set by function MonoImageSettings::SetImageDPI.
For a newly constructed object, if this function is not called to set option, that means a DPI value (which is 1.5 times of target compressed DPI value) will be used as the default value of this option.
[in] | dpi_limit | DPI value as the lower limit. This value should be a positive number. Suggested range: bigger than target compressed DPI value (set by function MonoImageSettings::SetImageDPI) and the maximum value is 10 times of target compressed DPI value. If input value is not bigger than the target compressed DPI value, a DPI value which is one more than the target compressed DPI value will be used instead. If input value is bigger than the maximum value, the maximum value value will be used instead. |
void foxit::addon::optimization::MonoImageSettings::SetQuality | ( | MonoImageCompressQuality | quality | ) |
Set compression quality, used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set this option, that means to use MonoImageSettings::e_ImageCompressQualityLossless as the default value of this option.
[in] | quality | Compression quality. Please refer to values starting from MonoImageSettings::e_ImageCompressQualityLossless and this should be one of these values. |
void foxit::addon::optimization::MonoImageSettings::SetStretchMode | ( | StretchMode | mode | ) |
Set stretch mode used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set this option, that means to use MonoImageSettings::e_StretchBicubic as the default value of this option.
[in] | mode | Stretch mode. Please refer to values starting from ImageSettings::e_StretchOff and this should be one of these values. |