Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.addon.optimization.MonoImageSettings Class Reference
Inheritance diagram for foxit.addon.optimization.MonoImageSettings:

## Public Types
enum | MonoImageCompressMode { MonoImageCompressMode.e_ImageCompressCCITT3 = 10001, MonoImageCompressMode.e_ImageCompressCCITT4 = 10002, MonoImageCompressMode.e_ImageCompressHigh = 10003, MonoImageCompressMode.e_ImageCompressjbig2 = 10004, MonoImageCompressMode.e_ImageCompressRetain = 10007, MonoImageCompressMode.e_ImageCompressRunLength = 10008, MonoImageCompressMode.e_ImageCompressZip = 10009 }
| Enumeration for compression mode used for monochrome image. More...
enum | MonoImageCompressQuality { MonoImageCompressQuality.e_ImageCompressQualityLossless = 1, MonoImageCompressQuality.e_ImageCompressQualityLossy = 2, MonoImageCompressQuality.e_ImageCompressQualityMinimum = 3, MonoImageCompressQuality.e_ImageCompressQualityLow = 4, MonoImageCompressQuality.e_ImageCompressQualityMedium = 5, MonoImageCompressQuality.e_ImageCompressQualityHigh = 6, MonoImageCompressQuality.e_ImageCompressQualityMaximum = 7 }
| Enumeration for compression quality used for monochrome image. More...
enum | StretchMode { StretchMode.e_StretchDefault = -1, StretchMode.e_StretchOff = 0x00, StretchMode.e_StretchInterpol = 0x20, StretchMode.e_StretchDownsample = 0x04, StretchMode.e_StretchBicubic = 0x80, StretchMode.e_StretchNoSmooth = 0x100 }
| Enumeration for stretch mode. More...

## Public Member Functions
| MonoImageSettings ()
| Constructor. More...
| MonoImageSettings (MonoImageSettings other)
| Constructor, with another result information object. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
void | SetCompressionMode (MonoImageSettings.MonoImageCompressMode mode)
| Set compression mode used for optimizing monochrome images in a PDF document. More...
void | SetImageDPI (int 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 (MonoImageSettings.MonoImageCompressQuality quality)
| Set compression quality, used for optimizing monochrome images in a PDF document. More...
void | SetStretchMode (MonoImageSettings.StretchMode mode)
| Set stretch mode used for optimizing monochrome images in a PDF document. More...

## Detailed Description

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.

See also
  OptimizerSettings

## Member Enumeration Documentation

## ◆ MonoImageCompressMode

enum foxit.addon.optimization.MonoImageSettings.MonoImageCompressMode
| strong

Enumeration for compression mode used for monochrome image.

Values of this enumeration should be used alone.

Enumerator
e_ImageCompressCCITT3 | Compression mode: CCITT Group 3.
e_ImageCompressCCITT4 | Compression mode: CCITT Group 4.
e_ImageCompressHigh | Compression mode: high.
e_ImageCompressjbig2 | Compression mode: jbig2.
e_ImageCompressRetain | Compression mode: retain, which means no compression.
e_ImageCompressRunLength | Compression mode: run-length.
e_ImageCompressZip | Compression mode: zip.

## ◆ MonoImageCompressQuality

enum foxit.addon.optimization.MonoImageSettings.MonoImageCompressQuality
| strong

Enumeration for compression quality used for monochrome image.

Values of this enumeration should be used alone.

Enumerator
e_ImageCompressQualityLossless | Compression quality: Lossless.
e_ImageCompressQualityLossy | Compression quality: Lossy.
e_ImageCompressQualityMinimum | Compression quality: Minimum, only for e_ImageCompressHigh compress mode.
e_ImageCompressQualityLow | Compression quality: Low, only for e_ImageCompressHigh compress mode.
e_ImageCompressQualityMedium | Compression quality: Medium, only for e_ImageCompressHigh compress mode.
e_ImageCompressQualityHigh | Compression quality: High, only for e_ImageCompressHigh compress mode.
e_ImageCompressQualityMaximum | Compression quality: Maximum, only for e_ImageCompressHigh compress mode.

## ◆ StretchMode

enum foxit.addon.optimization.MonoImageSettings.StretchMode
| strong

Enumeration for stretch mode.

Values of this enumeration should be used alone.

Enumerator
e_StretchDefault | When this is set, that means to do default stretching.
e_StretchOff | When this is set, that means to do without stretching.
e_StretchInterpol | When this is set, that means to do interpolation for zooming.
e_StretchDownsample | When this is set, that means not to do halftone for shrinking or rotating.
e_StretchBicubic | When this is set, that means to do bicubic interpolation for zooming.
e_StretchNoSmooth | When this is set, that means not to do any interpolation for stretching.

## Constructor & Destructor Documentation

## ◆ MonoImageSettings() [1/2]

foxit.addon.optimization.MonoImageSettings.MonoImageSettings | ( |  | ) |
| inline

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.

## ◆ MonoImageSettings() [2/2]

foxit.addon.optimization.MonoImageSettings.MonoImageSettings | ( | MonoImageSettings | other | ) |
| inline

Constructor, with another result information object.

Parameters

  [in] | other | Another monochrome image settings object.

## Member Function Documentation

## ◆ IsEmpty()

bool foxit.addon.optimization.MonoImageSettings.IsEmpty | ( |  | ) |
| inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ SetCompressionMode()

void foxit.addon.optimization.MonoImageSettings.SetCompressionMode | ( | MonoImageSettings.MonoImageCompressMode | mode | ) |
| inline

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 foxit.addon.optimization.MonoImageSettings.MonoImageCompressMode.e_ImageCompressCCITT4 as the default value of this option.

Parameters

  [in] | mode | Image compression mode. Please refer to values starting from foxit.addon.optimization.MonoImageSettings.MonoImageCompressMode.e_ImageCompressHigh and this should be one of these values.

Returns
  None.

## ◆ SetImageDPI()

void foxit.addon.optimization.MonoImageSettings.SetImageDPI | ( | int | dpi | ) |
| inline

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.

Parameters

  [in] | dpi | DPI value. If the images can be compressed, the resolution of these images will be compressed to this value.

Returns
  None.

## ◆ SetImageDPILimit()

void foxit.addon.optimization.MonoImageSettings.SetImageDPILimit | ( | int | dpi_limit | ) |
| inline

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.

Parameters

  [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.

Returns
  None.

## ◆ SetQuality()

void foxit.addon.optimization.MonoImageSettings.SetQuality | ( | MonoImageSettings.MonoImageCompressQuality | quality | ) |
| inline

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 foxit.addon.optimization.MonoImageSettings.MonoImageCompressQuality.e_ImageCompressQualityLossless as the default value of this option.

Parameters

  [in] | quality | Compression quality. Please refer to values starting from foxit.addon.optimization.MonoImageSettings.MonoImageCompressQuality.e_ImageCompressQualityLossless and this should be one of these values.

Returns
  None.

## ◆ SetStretchMode()

void foxit.addon.optimization.MonoImageSettings.SetStretchMode | ( | MonoImageSettings.StretchMode | mode | ) |
| inline

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 foxit.addon.optimization.MonoImageSettings.StretchMode.e_StretchBicubic as the default value of this option.

Parameters

  [in] | mode | Stretch mode. Please refer to values starting from foxit.addon.optimization.ImageSettings.StretchMode.e_StretchOff and this should be one of these values.

Returns
  None.