Show / Hide Table of Contents

# Class Optimizer.MonoImageSettings

A class that stores image downsampling/recompression settings for monochrome images.

##### Inheritance

object
Optimizer.MonoImageSettings

##### Inherited Members

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

###### Namespace: pdftron.PDF

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class Optimizer.MonoImageSettings

### Constructors

#### MonoImageSettings()

create an MonoImageSettings object with default options

##### Declaration

    public MonoImageSettings()

### 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)

##### Declaration

    public void ForceRecompression(bool force)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | force |

#### SetCompressionMode(CompressionMode)

Sets the output compression mode for monochrome images The default value is e_ccitt (CCITT group 4 compression)

##### Declaration

    public void SetCompressionMode(Optimizer.MonoImageSettings.CompressionMode mode)

##### Parameters

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

#### SetDownsampleMode(DownsampleMode)

Sets the downsample mode for monochrome images The default value is e_default

##### Declaration

    public void SetDownsampleMode(Optimizer.MonoImageSettings.DownsampleMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Optimizer.MonoImageSettings.DownsampleMode | mode | the compression mode to set

#### SetImageDPI(double, double)

Sets the maximum and resampling dpi for monochrome 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 | the image dpi to resample to if an image is encountered over the maximum dpi

#### SetJBIG2Threshold(double)

Sets the quality for lossy JBIG2Decode compression mode. The threshold is a floating point number in the range from 4 to 9 The default value for JBIG2 is 8.5. The setting is ignored for FLATE.

##### Declaration

    public void SetJBIG2Threshold(double jbig2_threshold)

##### Parameters

Type | Name | Description
--- | --- | ---
double | jbig2_threshold | The jbig2 threshold value