Show / Hide Table of Contents

# Class Optimizer.ImageSettings

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

##### Inheritance

object
Optimizer.ImageSettings

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.PDF

###### Assembly: PDFNet.dll

##### Syntax

    public class Optimizer.ImageSettings

### Constructors

#### ImageSettings()

create an ImageSetting object with default options

##### Declaration

    public ImageSettings()

### Methods

#### ForceChanges(bool)

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

##### Declaration

    public void ForceChanges(bool force)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | force | if true all image changes will be kept.

#### ForceRecompression(bool)

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.

##### Declaration

    public void ForceRecompression(bool force)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | force | if true the compression method for all images will be changed to the specified compression mode

#### SetCompressionMode(CompressionMode)

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

##### Declaration

    public void SetCompressionMode(Optimizer.ImageSettings.CompressionMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Optimizer.ImageSettings.CompressionMode | mode | the compression mode to set

#### SetDownsampleMode(DownsampleMode)

Sets the downsample mode for this type of image The default value is e_default

##### Declaration

    public void SetDownsampleMode(Optimizer.ImageSettings.DownsampleMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Optimizer.ImageSettings.DownsampleMode | mode | the downloadsample mode to set

#### SetImageDPI(double, double)

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

##### Declaration

    public void SetImageDPI(double maximum, double resampling)

##### Parameters

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

#### SetQuality(int)

##### Declaration

    public void SetQuality(int quality)

##### Parameters

Type | Name | Description
--- | --- | ---
int | quality |