Foxit PDF SDK
FSImageSettings Class Reference
Inheritance diagram for FSImageSettings:
FSBase

Instance Methods

(id) - init
 Constructor.
More...
 
(id) - initWithOther:
 Constructor, with another image settings object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(void) - setCompressionMode:
 Set compression mode used for optimizing color/gray images in a PDF document.
More...
 
(void) - setImageDPI:
 Set the DPI value as the target compressed value for compressing color/gray images in a PDF document.
More...
 
(void) - setImageDPILimit:
 Set the lower limit DPI value for the color/gray image to decide if the image is to be compressed in a PDF document.
More...
 
(void) - setQuality:
 Set the quality for lossy compression modes, used for optimizing color/gray images in a PDF document.
More...
 
(void) - setStretchMode:
 Set stretch mode used for optimizing color/gray images in a PDF document.
More...
 

Detailed Description

This class represents downsampling/recompression settings for color and grayscale images. This class object can be set to class FSOptimizerSettings and then be used to optimize a PDF document.

See also
FSOptimizerSettings

Method Documentation

◆ init()

- (id) init

Constructor.

This constructor is to construct a color/gray 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.

◆ initWithOther:()

- (id) initWithOther: (FSImageSettings*)  other

Constructor, with another image settings object.

Parameters
[in]otherAnother image settings object.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

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

Returns
YES means current object is empty, while NO means not.

◆ setCompressionMode:()

- (void) setCompressionMode: (FSImageSettingsImageCompressMode mode

Set compression mode used for optimizing color/gray images in a PDF document.

For a newly constructed object, if this function is not called to set option, that means to use FSImageSettingsImageCompressjpeg as the default value of this option.

Parameters
[in]modeImage compression mode. Please refer to values starting from FSImageSettingsImageCompressHigh and this should be one of these values.
Returns
None.

◆ setImageDPI:()

- (void) setImageDPI: (int)  dpi

Set the DPI value as the target compressed value for compressing color/gray 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 150 as the default value of this option.

Parameters
[in]dpiDPI value which is set to be the target compressed DPI value.
Returns
None.

◆ setImageDPILimit:()

- (void) setImageDPILimit: (int)  dpi_limit

Set the lower limit DPI value for the color/gray 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 FSImageSettings::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_limitDPI value as the lower limit. This value should be a positive number. Suggested range: bigger than target compressed DPI value (set by function FSImageSettings::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) setQuality: (FSImageSettingsImageCompressQuality quality

Set the quality for lossy compression modes, used for optimizing color/gray images in a PDF document.

For a newly constructed object, if this function is not called to set this option, that means to use FSImageSettingsImageCompressQualityMinimum as the default value of this option.

Parameters
[in]qualityQuality value for lossy compression modes. Please refer to values starting from FSImageSettingsImageCompressQualityMinimum and this should be one of these values.
Returns
None.

◆ setStretchMode:()

- (void) setStretchMode: (FSImageSettingsStretchMode mode

Set stretch mode used for optimizing color/gray images in a PDF document.

For a newly constructed object, if this function is not called to set this option, that means to use FSImageSettingsStretchBicubic as the default value of this option.

Parameters
[in]modeStretch mode. Please refer to values starting from FSImageSettingsStretchOff and this should be one of these values.
Returns
None.