# ImageSaveParams Class

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

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2a
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ImageSaveParams
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/llms.txt

```java
class ImageSaveParams
```

**Namespace:** `com::datalogics::PDFL`

## 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/apdfl18/Java/APDFL18.0.5PlusP2a/class/Image.md), [`ImageCollection`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ImageCollection.md)

## Constructors

### ImageSaveParams

```java
com.datalogics.PDFL.ImageSaveParams.ImageSaveParams()
```

*constructor*

Default parameters for saving an image to a file.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.ImageSaveParams.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.ImageSaveParams.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.ImageSaveParams.finalize()
```

*protected*

**Returns:** `void`

### getCompression

```java
CompressionCode com.datalogics.PDFL.ImageSaveParams.getCompression()
```

**Returns:** `CompressionCode`

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

### getDisableAlphaChannelGeneration

```java
boolean com.datalogics.PDFL.ImageSaveParams.getDisableAlphaChannelGeneration()
```

**Returns:** `boolean`

Is the RGB image data to be combined with the Mask image data in the output file. Note: This is only valid for image data which has a Mask and the output format supports alpha information (e.g. TIFF or PNG).

### getHalftoneGrayImages

```java
boolean com.datalogics.PDFL.ImageSaveParams.getHalftoneGrayImages()
```

**Returns:** `boolean`

Is this is a Half Tone Grayscale Image.. Note this can only be set to true for an image of ColorSpace of DeviceGray;

### getJPEGQuality

```java
int com.datalogics.PDFL.ImageSaveParams.getJPEGQuality()
```

**Returns:** `int`

The quality of a (JPEG) output image.

### getMonochromeThreshold

```java
short com.datalogics.PDFL.ImageSaveParams.getMonochromeThreshold()
```

**Returns:** `short`

Threshold to use for determining which bits are white or black for Monochrome output (0-255, default is 128). Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.

### getRaiseExceptionIfNotUsableColor

```java
boolean com.datalogics.PDFL.ImageSaveParams.getRaiseExceptionIfNotUsableColor()
```

**Returns:** `boolean`

When an image is written that is not in a format native to the image type, shall we raise an exception. or automatically convert the image data.

### getReverseGray

```java
boolean com.datalogics.PDFL.ImageSaveParams.getReverseGray()
```

**Returns:** `boolean`

Is the GrayScale output reversed. Note this is only valid for an image with a DeviceGray Colorspace.

### getTIFFBlackIsOne

```java
boolean com.datalogics.PDFL.ImageSaveParams.getTIFFBlackIsOne()
```

**Returns:** `boolean`

Is a TIFF file photometrically reversed. Note this is only valid for a 1 bit TIFF image with a DeviceGRAY Colorspace.

### getTIFFByteOrder

```java
TIFFByteOrder com.datalogics.PDFL.ImageSaveParams.getTIFFByteOrder()
```

**Returns:** `TIFFByteOrder`

Controls the byte order used within the TIFF file. NOTE: This is only valid for TIFF.

### getTIFFCMYKAlpha

```java
boolean com.datalogics.PDFL.ImageSaveParams.getTIFFCMYKAlpha()
```

**Returns:** `boolean`

Is the CMYK image data to be combined with the Soft Mask image data in the output TIF file. Note: This is only valid for CMYK image data which has a Soft Mask, the output will be 40-bit.

### getWriteSeparationColorsToTIFF

```java
boolean com.datalogics.PDFL.ImageSaveParams.getWriteSeparationColorsToTIFF()
```

**Returns:** `boolean`

When we write an image that is specified in a separation or deviceN color, we will Convert that image to sRGB, if WriteSeparationColorsToTIFF is false, or write it using the Photoshop Tag for separation colors, if WriteSeparationColorsToTIFF is true.

### setCompression

```java
void com.datalogics.PDFL.ImageSaveParams.setCompression(CompressionCode arg0)
```

**Parameters**

- `arg0` (`CompressionCode`)

**Returns:** `void`

### setDisableAlphaChannelGeneration

```java
void com.datalogics.PDFL.ImageSaveParams.setDisableAlphaChannelGeneration(boolean disableAlphaChannelGeneration)
```

**Parameters**

- `disableAlphaChannelGeneration` (`boolean`)

**Returns:** `void`

### setHalftoneGrayImages

```java
void com.datalogics.PDFL.ImageSaveParams.setHalftoneGrayImages(boolean arg0)
```

**Parameters**

- `arg0` (`boolean`)

**Returns:** `void`

### setJPEGQuality

```java
void com.datalogics.PDFL.ImageSaveParams.setJPEGQuality(int arg0)
```

**Parameters**

- `arg0` (`int`)

**Returns:** `void`

### setMonochromeThreshold

```java
void com.datalogics.PDFL.ImageSaveParams.setMonochromeThreshold(short monochromeThreshold)
```

**Parameters**

- `monochromeThreshold` (`short`)

**Returns:** `void`

### setRaiseExceptionIfNotUsableColor

```java
void com.datalogics.PDFL.ImageSaveParams.setRaiseExceptionIfNotUsableColor(boolean RaiseExceptionIfNotUsableColor)
```

**Parameters**

- `RaiseExceptionIfNotUsableColor` (`boolean`)

**Returns:** `void`

### setReverseGray

```java
void com.datalogics.PDFL.ImageSaveParams.setReverseGray(boolean arg0)
```

**Parameters**

- `arg0` (`boolean`)

**Returns:** `void`

### setTIFFBlackIsOne

```java
void com.datalogics.PDFL.ImageSaveParams.setTIFFBlackIsOne(boolean arg0)
```

**Parameters**

- `arg0` (`boolean`)

**Returns:** `void`

### setTIFFByteOrder

```java
void com.datalogics.PDFL.ImageSaveParams.setTIFFByteOrder(TIFFByteOrder tiffByteOrder)
```

**Parameters**

- `tiffByteOrder` (`TIFFByteOrder`)

**Returns:** `void`

### setTIFFCMYKAlpha

```java
void com.datalogics.PDFL.ImageSaveParams.setTIFFCMYKAlpha(boolean cmykAlpha)
```

**Parameters**

- `cmykAlpha` (`boolean`)

**Returns:** `void`

### setWriteSeparationColorsToTIFF

```java
void com.datalogics.PDFL.ImageSaveParams.setWriteSeparationColorsToTIFF(boolean WriteSeparationColorsToTIFF)
```

**Parameters**

- `WriteSeparationColorsToTIFF` (`boolean`)

**Returns:** `void`
