# ImageSaveParams Class

> Class that defines parameters for saving an image to a graphics file.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/ImageSaveParams
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class ImageSaveParams : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

Class that defines parameters for saving an image to a graphics file.

The parameters include the file type (such as PNG or JPG), compression, image quality, and gray scale.

**Referenced by:** [`Image`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Image.md), [`ImageCollection`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/ImageCollection.md)

**Uses types:** [`CompressionCode`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/CompressionCode.md), [`TIFFByteOrder`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/TIFFByteOrder.md)

## Constructors

### ImageSaveParams

```csharp
Datalogics.PDFL.ImageSaveParams.ImageSaveParams()
```

*constructor*

Default parameters for saving an image to a file.

## Properties

### Compression

```csharp
CompressionCode Datalogics.PDFL.ImageSaveParams.Compression { get; set; }
```

Gets the type of compression to be used in saving the image to a file.

### DisableAlphaChannelGeneration

```csharp
bool Datalogics.PDFL.ImageSaveParams.DisableAlphaChannelGeneration { get; set; }
```

Gets whether alpha channel generation is disabled for the output image.

When false, RGB image data with a Mask will be combined as RGBA + Alpha Channel output (32-bit). When true, the Mask is not combined and the output is RGB (24-bit). This is only valid for TIFF and PNG output formats.

### HalftoneGrayImages

```csharp
bool Datalogics.PDFL.ImageSaveParams.HalftoneGrayImages { get; set; }
```

Gets whether grayscale images are converted to halftone.

When true, converts 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi. Note this can only be set to true for an image of ColorSpace of DeviceGray.

### JPEGQuality

```csharp
int Datalogics.PDFL.ImageSaveParams.JPEGQuality { get; set; }
```

Gets the quality of a JPEG output image.

### MonochromeThreshold

```csharp
byte Datalogics.PDFL.ImageSaveParams.MonochromeThreshold { get; set; }
```

Gets the threshold for determining which bits are white or black for Monochrome output.

Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.

### RaiseExceptionIfNotUsableColor

```csharp
bool Datalogics.PDFL.ImageSaveParams.RaiseExceptionIfNotUsableColor { get; set; }
```

Gets whether an exception is raised if the image color format is not natively supported.

When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, the image will be automatically converted into a form that can be saved natively (generally DeviceRGB using the sRGB profile).

### ReverseGray

```csharp
bool Datalogics.PDFL.ImageSaveParams.ReverseGray { get; set; }
```

Gets whether the GrayScale output is reversed.

Note this is only valid for an image with a DeviceGray Colorspace.

### TIFFBlackIsOne

```csharp
bool Datalogics.PDFL.ImageSaveParams.TIFFBlackIsOne { get; set; }
```

Gets whether a TIFF file is photometrically reversed.

Note this is only valid for a 1-bit TIFF image with a DeviceGray Colorspace.

### TIFFByteOrder

```csharp
TIFFByteOrder Datalogics.PDFL.ImageSaveParams.TIFFByteOrder { get; set; }
```

Gets the byte order used within the TIFF file.

This is only valid for TIFF output.

### TIFFCMYKAlpha

```csharp
bool Datalogics.PDFL.ImageSaveParams.TIFFCMYKAlpha { get; set; }
```

Gets whether CMYK image data is combined with the Soft Mask in TIFF output.

Note: This is only valid for CMYK image data which has a Soft Mask; the output will be 40-bit.

### WriteSeparationColorsToTIFF

```csharp
bool Datalogics.PDFL.ImageSaveParams.WriteSeparationColorsToTIFF { get; set; }
```

Gets whether separation colors are written to TIFF using the Photoshop tag.

When false, separation colors will be converted to their alternate color space and rendered as RGB. When true, separation colors are output using the TIFF Photoshop tag.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.ImageSaveParams.Dispose()
```

**Returns:** `void`
