**Inheritance:**
java.lang.Object
```
public class DitheringMode
```

Dithering settings to be applied to image upon saving.
## Constructors

| Constructor | Description |
| --- | --- |
| [DitheringMode()](#DitheringMode--) |  |
## Methods

| Method | Description |
| --- | --- |
| [getMethod()](#getMethod--) | Dithering algorithm selection. |
| [setMethod(int value)](#setMethod-int-) | Dithering algorithm selection. |
| [getBits()](#getBits--) | The sampling factor of dithered image. |
| [setBits(int value)](#setBits-int-) | The sampling factor of dithered image. |
| [getCustomPalette()](#getCustomPalette--) | The custom palette for dithering. |
| [setCustomPalette(IColorPalette value)](#setCustomPalette-com.aspose.imaging.IColorPalette-) | The custom palette for dithering. |
### DitheringMode() {#DitheringMode--}
```
public DitheringMode()
```


### getMethod() {#getMethod--}
```
public int getMethod()
```


Dithering algorithm selection.

**Returns:**
int
### setMethod(int value) {#setMethod-int-}
```
public void setMethod(int value)
```


Dithering algorithm selection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int |  |

### getBits() {#getBits--}
```
public int getBits()
```


The sampling factor of dithered image.

**Returns:**
int
### setBits(int value) {#setBits-int-}
```
public void setBits(int value)
```


The sampling factor of dithered image.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int |  |

### getCustomPalette() {#getCustomPalette--}
```
public IColorPalette getCustomPalette()
```


The custom palette for dithering.

**Returns:**
[IColorPalette](../../com.aspose.imaging/icolorpalette)
### setCustomPalette(IColorPalette value) {#setCustomPalette-com.aspose.imaging.IColorPalette-}
```
public void setCustomPalette(IColorPalette value)
```


The custom palette for dithering.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [IColorPalette](../../com.aspose.imaging/icolorpalette) |  |

