
**Inheritance:** java.lang.Object, ImageOptionsBase

The gif file format creation options.

## Constructors

| Constructor | Description |
| --- | --- |
| [GifOptions()](#GifOptions) | Initializes a new instance of the GifOptions class. |
| [GifOptions(GifOptions gifOptions)](#GifOptions-com.aspose.cad.imageoptions.GifOptions) | Initializes a new instance of the GifOptions class. |

## Methods

| Method | Description |
| --- | --- |
| [getTargetFormat()](#getTargetFormat) |  |
| [getXmpData()](#getXmpData) | Gets or sets the XMP metadata container. |
| [setXmpData(com.aspose.cad.xmp.XmpPacketWrapper value)](#setXmpData-com.aspose.cad.xmp.XmpPacketWrapper) | Gets or sets the XMP metadata container. |
| [getDoPaletteCorrection()](#getDoPaletteCorrection) | Gets or sets a value indicating whether palette correction is applied. |
| [setDoPaletteCorrection(boolean value)](#setDoPaletteCorrection-boolean) | Gets or sets a value indicating whether palette correction is applied. |
| [getColorResolution()](#getColorResolution) | Gets or sets the GIF color resolution. |
| [setColorResolution(byte value)](#setColorResolution-byte) | Gets or sets the GIF color resolution. |
| [isPaletteSorted()](#isPaletteSorted) | Gets or sets a value indicating whether palette entries are sorted. |
| [setPaletteSorted(boolean value)](#setPaletteSorted-boolean) | Gets or sets a value indicating whether palette entries are sorted. |
| [getPixelAspectRatio()](#getPixelAspectRatio) | Gets or sets the GIF pixel aspect ratio. |
| [setPixelAspectRatio(byte value)](#setPixelAspectRatio-byte) | Gets or sets the GIF pixel aspect ratio. |
| [getBackgroundColorIndex()](#getBackgroundColorIndex) | Gets or sets the GIF background color index. |
| [setBackgroundColorIndex(byte value)](#setBackgroundColorIndex-byte) | Gets or sets the GIF background color index. |
| [hasTrailer()](#hasTrailer) | Gets or sets a value indicating whether GIF has trailer. |
| [setTrailer(boolean value)](#setTrailer-boolean) | Gets or sets a value indicating whether GIF has trailer. |
| [getInterlaced()](#getInterlaced) | True if image should be interlaced. |
| [setInterlaced(boolean value)](#setInterlaced-boolean) | True if image should be interlaced. |

### GifOptions() {#GifOptions}
```java
public GifOptions()
```

Initializes a new instance of the GifOptions class.

### GifOptions(GifOptions gifOptions) {#GifOptions-com.aspose.cad.imageoptions.GifOptions}
```java
public GifOptions(GifOptions gifOptions)
```

Initializes a new instance of the GifOptions class.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| gifOptions | GifOptions | The GIF Options. |

### getTargetFormat() {#getTargetFormat}
```java
public long getTargetFormat()
```

**Returns:** long

### getXmpData() {#getXmpData}
```java
public com.aspose.cad.xmp.XmpPacketWrapper getXmpData()
```

Gets or sets the XMP metadata container.

**Returns:** com.aspose.cad.xmp.XmpPacketWrapper - The XMP data container.

### setXmpData(com.aspose.cad.xmp.XmpPacketWrapper value) {#setXmpData-com.aspose.cad.xmp.XmpPacketWrapper}
```java
public void setXmpData(com.aspose.cad.xmp.XmpPacketWrapper value)
```

Gets or sets the XMP metadata container.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | com.aspose.cad.xmp.XmpPacketWrapper | The XMP data container. |

### getDoPaletteCorrection() {#getDoPaletteCorrection}
```java
public boolean getDoPaletteCorrection()
```

Gets or sets a value indicating whether palette correction is applied.

**Returns:** boolean - true if palette correction is applied; otherwise, false . Palette correction means that whenever image is exported to GIF the source image colors will be analyzed in order to build the best matching palette (in case image Palette does not exist or not specified in the options). The analyze process takes some time however the output image will have the best matching color palette and result is visually better.

### setDoPaletteCorrection(boolean value) {#setDoPaletteCorrection-boolean}
```java
public void setDoPaletteCorrection(boolean value)
```

Gets or sets a value indicating whether palette correction is applied.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | true if palette correction is applied; otherwise, false . Palette correction means that whenever image is exported to GIF the source image colors will be analyzed in order to build the best matching palette (in case image Palette does not exist or not specified in the options). The analyze process takes some time however the output image will have the best matching color palette and result is visually better. |

### getColorResolution() {#getColorResolution}
```java
public byte getColorResolution()
```

Gets or sets the GIF color resolution.

**Returns:** byte - The color resolution. Color Resolution - Number of bits per primary color available to the original image, minus 1. This value represents the size of the entire palette from which the colors in the graphic were selected, not the number of colors actually used in the graphic. For example, if the value in this field is 3, then the palette of the original image had 4 bits per primary color available to create the image. This value should be set to indicate the richness of the original palette, even if not every color from the whole palette is available on the source machine.

### setColorResolution(byte value) {#setColorResolution-byte}
```java
public void setColorResolution(byte value)
```

Gets or sets the GIF color resolution.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | byte | The color resolution. Color Resolution - Number of bits per primary color available to the original image, minus 1. This value represents the size of the entire palette from which the colors in the graphic were selected, not the number of colors actually used in the graphic. For example, if the value in this field is 3, then the palette of the original image had 4 bits per primary color available to create the image. This value should be set to indicate the richness of the original palette, even if not every color from the whole palette is available on the source machine. |

### isPaletteSorted() {#isPaletteSorted}
```java
public boolean isPaletteSorted()
```

Gets or sets a value indicating whether palette entries are sorted.

**Returns:** boolean - true if palette entries are sorted; otherwise, false .

### setPaletteSorted(boolean value) {#setPaletteSorted-boolean}
```java
public void setPaletteSorted(boolean value)
```

Gets or sets a value indicating whether palette entries are sorted.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | true if palette entries are sorted; otherwise, false . |

### getPixelAspectRatio() {#getPixelAspectRatio}
```java
public byte getPixelAspectRatio()
```

Gets or sets the GIF pixel aspect ratio.

**Returns:** byte - The GIF pixel aspect ratio. Pixel Aspect Ratio - Factor used to compute an approximation of the aspect ratio of the pixel in the original image. If the value of the field is not 0, this approximation of the aspect ratio is computed based on the formula: Aspect Ratio = (Pixel Aspect Ratio + 15) / 64 The Pixel Aspect Ratio is defined to be the quotient of the pixel's width over its height. The value range in this field allows specification of the widest pixel of 4:1 to the tallest pixel of 1:4 in increments of 1/64th. Values : 0 - No aspect ratio information is given. 1..255 - Value used in the computation.

### setPixelAspectRatio(byte value) {#setPixelAspectRatio-byte}
```java
public void setPixelAspectRatio(byte value)
```

Gets or sets the GIF pixel aspect ratio.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | byte | The GIF pixel aspect ratio. Pixel Aspect Ratio - Factor used to compute an approximation of the aspect ratio of the pixel in the original image. If the value of the field is not 0, this approximation of the aspect ratio is computed based on the formula: Aspect Ratio = (Pixel Aspect Ratio + 15) / 64 The Pixel Aspect Ratio is defined to be the quotient of the pixel's width over its height. The value range in this field allows specification of the widest pixel of 4:1 to the tallest pixel of 1:4 in increments of 1/64th. Values : 0 - No aspect ratio information is given. 1..255 - Value used in the computation. |

### getBackgroundColorIndex() {#getBackgroundColorIndex}
```java
public byte getBackgroundColorIndex()
```

Gets or sets the GIF background color index.

**Returns:** byte - The GIF background color index.

### setBackgroundColorIndex(byte value) {#setBackgroundColorIndex-byte}
```java
public void setBackgroundColorIndex(byte value)
```

Gets or sets the GIF background color index.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | byte | The GIF background color index. |

### hasTrailer() {#hasTrailer}
```java
public boolean hasTrailer()
```

Gets or sets a value indicating whether GIF has trailer.

**Returns:** boolean - true if GIF has trailer; otherwise, false .

### setTrailer(boolean value) {#setTrailer-boolean}
```java
public void setTrailer(boolean value)
```

Gets or sets a value indicating whether GIF has trailer.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | true if GIF has trailer; otherwise, false . |

### getInterlaced() {#getInterlaced}
```java
public boolean getInterlaced()
```

True if image should be interlaced.

**Returns:** boolean

### setInterlaced(boolean value) {#setInterlaced-boolean}
```java
public void setInterlaced(boolean value)
```

True if image should be interlaced.

