> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md).

# ImageAttributes

Namespace: **System.Drawing.Imaging**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Contains information about how bitmap and metafile colors are manipulated during rendering.

{% tabs %}
{% tab title="C#" %}

```csharp
public class ImageAttributes : ICloneable, IDisposable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ImageAttributes
    Inherits ICloneable
    Implements IDisposable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ImageAttributes()

Initializes a new instance of the [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) class.

## Methods

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearBrushRemapTable()

Clears the brush color-remap table of this [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearColorKey(type)

Clears the color key (transparency range) for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color key is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearColorKey()

Clears the color key (transparency range) for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearColorMatrix()

Clears the color-adjustment matrix for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearColorMatrix(type)

Clears the color-adjustment matrix for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color-adjustment matrix is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearGamma()

Disables gamma correction for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearGamma(type)

Disables gamma correction for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                       |
| --------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which gamma correction is disabled. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearNoOp()

Clears the setting for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearNoOp(type)

Clears the setting for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the setting is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearOutputChannel()

Clears the CMYK (cyan-magenta-yellow-black) output channel setting for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearOutputChannel(type)

Clears the (cyan-magenta-yellow-black) output channel setting for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                                |
| --------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the output channel setting is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearOutputChannelColorProfile()

Clears the output channel color profile setting for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearOutputChannelColorProfile(type)

Clears the output channel color profile setting for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                                       |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of[ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the output channel profile setting is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearRemapTable()

Clears the color-remap table for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearRemapTable(type)

Clears the color-remap table for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the remap table is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearThreshold()

Clears the threshold value for the default category.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearThreshold(type)

Clears the threshold value for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the threshold is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Clone()

Creates an exact copy of this [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object.

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object this class creates, cast as an object.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Dispose()

Releases all resources used by this [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetAdjustedPalette(palette, type)

Adjusts the colors in a palette according to the adjustment settings of a specified category.

| Parameter   | Type                                                                                                            | Description                                                                                                                                                                                                         |
| ----------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **palette** | [ColorPalette](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorpalette.md)       | A [ColorPalette](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorpalette.md) that on input contains the palette to be adjusted, and on output contains the adjusted palette.         |
| **type**    | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category whose adjustment settings will be applied to the palette. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetBrushRemapTable(map)

Sets the brush remap table.

| Parameter | Type                                                                                  | Description                                                                                                                        |
| --------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **map**   | [ColorMap\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.imaging.colormap) | An array of color pairs of type [ColorMap](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormap.md). |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorKey(colorLow, colorHigh)

Sets the color key for the default category.

| Parameter     | Type                                                                | Description               |
| ------------- | ------------------------------------------------------------------- | ------------------------- |
| **colorLow**  | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) | The low color-key value.  |
| **colorHigh** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) | The high color-key value. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorKey(colorLow, colorHigh, type)

Sets the color key (transparency range) for a specified category.

| Parameter     | Type                                                                                                            | Description                                                                                                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colorLow**  | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                             | The low color-key value.                                                                                                                                                                  |
| **colorHigh** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                             | The high color-key value.                                                                                                                                                                 |
| **type**      | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color key is set. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrices(newColorMatrix, grayMatrix)

Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.

| Parameter          | Type                                                                                                    | Description                      |
| ------------------ | ------------------------------------------------------------------------------------------------------- | -------------------------------- |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md) | The color-adjustment matrix.     |
| **grayMatrix**     | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md) | The grayscale-adjustment matrix. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrices(newColorMatrix, grayMatrix, flags)

Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.

| Parameter          | Type                                                                                                            | Description                                                                                                                                                                                                                                               |
| ------------------ | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The color-adjustment matrix.                                                                                                                                                                                                                              |
| **grayMatrix**     | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The grayscale-adjustment matrix.                                                                                                                                                                                                                          |
| **flags**          | [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) | An element of [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) that specifies the type of image and color that will be affected by the color-adjustment and grayscale-adjustment matrices. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrices(newColorMatrix, grayMatrix, mode, type)

Sets the color-adjustment matrix and the grayscale-adjustment matrix for a specified category.

| Parameter          | Type                                                                                                            | Description                                                                                                                                                                                                                                               |
| ------------------ | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The color-adjustment matrix.                                                                                                                                                                                                                              |
| **grayMatrix**     | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The grayscale-adjustment matrix.                                                                                                                                                                                                                          |
| **mode**           | [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) | An element of [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) that specifies the type of image and color that will be affected by the color-adjustment and grayscale-adjustment matrices. |
| **type**           | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color-adjustment and grayscale-adjustment matrices are set.                       |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrix(newColorMatrix)

Sets the color-adjustment matrix for the default category.

| Parameter          | Type                                                                                                    | Description                  |
| ------------------ | ------------------------------------------------------------------------------------------------------- | ---------------------------- |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md) | The color-adjustment matrix. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrix(newColorMatrix, flags)

Sets the color-adjustment matrix for the default category.

| Parameter          | Type                                                                                                            | Description                                                                                                                                                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The color-adjustment matrix.                                                                                                                                                                                                   |
| **flags**          | [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) | An element of [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) that specifies the type of image and color that will be affected by the color-adjustment matrix. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetColorMatrix(newColorMatrix, mode, type)

Sets the color-adjustment matrix for a specified category.

| Parameter          | Type                                                                                                            | Description                                                                                                                                                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **newColorMatrix** | [ColorMatrix](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrix.md)         | The color-adjustment matrix.                                                                                                                                                                                                   |
| **mode**           | [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) | An element of [ColorMatrixFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormatrixflag.md) that specifies the type of image and color that will be affected by the color-adjustment matrix. |
| **type**           | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color-adjustment matrix is set.                        |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetGamma(gamma)

Sets the gamma value for the default category.

| Parameter | Type                                                          | Description                 |
| --------- | ------------------------------------------------------------- | --------------------------- |
| **gamma** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The gamma correction value. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetGamma(gamma, type)

Sets the gamma value for a specified category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **gamma** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                                   | The gamma correction value.                                                                                                                                                                   |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the threshold is cleared. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetNoOp()

Turns off color adjustment for the default category. You can call the [ClearNoOp](#clearnoop) method to reinstate the color-adjustment settings that were in place before the call to the [SetNoOp](#setnoop) method.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetNoOp(type)

Turns off color adjustment for a specified category. You can call the [ClearNoOp](#clearnoop) method to reinstate the color-adjustment settings that were in place before the call to the [SetNoOp](#setnoop) method.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                         |
| --------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which color correction is turned off. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetOutputChannel(flags)

Sets the CMYK (cyan-magenta-yellow-black) output channel for the default category.

| Parameter | Type                                                                                                              | Description                                                                                                                                                        |
| --------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **flags** | [ColorChannelFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorchannelflag.md) | An element of [ColorChannelFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorchannelflag.md) that specifies the output channel. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetOutputChannel(flags, type)

Sets the CMYK (cyan-magenta-yellow-black) output channel for a specified category.

| Parameter | Type                                                                                                              | Description                                                                                                                                                                                    |
| --------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **flags** | [ColorChannelFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorchannelflag.md) | An element of [ColorChannelFlag](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colorchannelflag.md) that specifies the output channel.                             |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md)   | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the output channel is set. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetOutputChannelColorProfile(colorProfileFilename)

Sets the output channel color-profile file for the default category.

| Parameter                | Type                                                          | Description                                                                                                                                                                                                                           |
| ------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colorProfileFilename** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The path name of a color-profile file. If the color-profile file is in the %SystemRoot%\System32\Spool\Drivers\Color directory, this parameter can be the file name. Otherwise, this parameter must be the fully qualified path name. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetOutputChannelColorProfile(colorProfileFilename, type)

Sets the output channel color-profile file for a specified category.

| Parameter                | Type                                                                                                            | Description                                                                                                                                                                                                                           |
| ------------------------ | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colorProfileFilename** | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                   | The path name of a color-profile file. If the color-profile file is in the %SystemRoot%\System32\Spool\Drivers\Color directory, this parameter can be the file name. Otherwise, this parameter must be the fully qualified path name. |
| **type**                 | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the output channel color-profile file is set.                     |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetRemapTable(map)

Sets the color-remap table for the default category.

| Parameter | Type                                                                                  | Description                                                                                                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **map**   | [ColorMap\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.imaging.colormap) | An array of color pairs of type [ColorMap](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormap.md). Each color pair contains an existing color (the first value) and the color that it will be mapped to (the second value). |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetRemapTable(map, type)

Sets the color-remap table for the default category.

| Parameter | Type                                                                                                            | Description                                                                                                                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **map**   | [ColorMap\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.imaging.colormap)                           | An array of color pairs of type [ColorMap](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.colormap.md). Each color pair contains an existing color (the first value) and the color that it will be mapped to (the second value). |
| **type**  | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color-remap table is set.                                                           |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetThreshold(threshold)

Sets the threshold (transparency range) for the default category.

| Parameter     | Type                                                          | Description                                       |
| ------------- | ------------------------------------------------------------- | ------------------------------------------------- |
| **threshold** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A real number that specifies the threshold value. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetThreshold(threshold, type)

Sets the threshold (transparency range) for a specified category.

| Parameter     | Type                                                                                                            | Description                                                                                                                                                                                     |
| ------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **threshold** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                                   | A threshold value from 0.0 to 1.0 that is used as a breakpoint to sort colors that will be mapped to either a maximum or a minimum value.                                                       |
| **type**      | [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) | An element of [ColorAdjustType](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.coloradjusttype.md) that specifies the category for which the color threshold is set. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetWrapMode(mode)

Sets the wrap mode that is used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.

| Parameter | Type                                                                                                  | Description                                                                                                                                                                                  |
| --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **mode**  | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | An element of [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) that specifies how repeated copies of an image are used to tile an area. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetWrapMode(mode, color)

Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.

| Parameter | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **mode**  | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | An element of [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) that specifies how repeated copies of an image are used to tile an area.                                                                                                                                                                                                                                                                                                                                           |
| **color** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                   | An [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object that specifies the color of pixels outside of a rendered image. This color is visible if the mode parameter is set to [Clamp](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md#fields) and the source rectangle passed to [DrawImage](/system.drawing.managed/api/system.drawing/system.drawing.graphics.md#drawimage-image-point) is larger than the image itself. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetWrapMode(mode, color, clamp)

Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.

| Parameter | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **mode**  | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | An element of [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) that specifies how repeated copies of an image are used to tile an area.                                                                                                                                                                                                                                                                                                                                           |
| **color** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                   | An [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object that specifies the color of pixels outside of a rendered image. This color is visible if the mode parameter is set to [Clamp](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md#fields) and the source rectangle passed to [DrawImage](/system.drawing.managed/api/system.drawing/system.drawing.graphics.md#drawimage-image-point) is larger than the image itself. |
| **clamp** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | This parameter has no effect. Set it to .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
