ImageAttributes Class

ImageAttributes Class

 

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

Namespace:   System.Drawing.Imaging
Assembly:  System.Drawing (in System.Drawing.dll)

System::Object
  System.Drawing.Imaging::ImageAttributes

public ref class ImageAttributes sealed : ICloneable, IDisposable

NameDescription
System_CAPS_pubmethodImageAttributes()

Initializes a new instance of the ImageAttributes class.

NameDescription
System_CAPS_pubmethodClearBrushRemapTable()

Clears the brush color-remap table of this ImageAttributes object.

System_CAPS_pubmethodClearColorKey()

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

System_CAPS_pubmethodClearColorKey(ColorAdjustType)

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

System_CAPS_pubmethodClearColorMatrix()

Clears the color-adjustment matrix for the default category.

System_CAPS_pubmethodClearColorMatrix(ColorAdjustType)

Clears the color-adjustment matrix for a specified category.

System_CAPS_pubmethodClearGamma()

Disables gamma correction for the default category.

System_CAPS_pubmethodClearGamma(ColorAdjustType)

Disables gamma correction for a specified category.

System_CAPS_pubmethodClearNoOp()

Clears the NoOp setting for the default category.

System_CAPS_pubmethodClearNoOp(ColorAdjustType)

Clears the NoOp setting for a specified category.

System_CAPS_pubmethodClearOutputChannel()

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

System_CAPS_pubmethodClearOutputChannel(ColorAdjustType)

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

System_CAPS_pubmethodClearOutputChannelColorProfile()

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

System_CAPS_pubmethodClearOutputChannelColorProfile(ColorAdjustType)

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

System_CAPS_pubmethodClearRemapTable()

Clears the color-remap table for the default category.

System_CAPS_pubmethodClearRemapTable(ColorAdjustType)

Clears the color-remap table for a specified category.

System_CAPS_pubmethodClearThreshold()

Clears the threshold value for the default category.

System_CAPS_pubmethodClearThreshold(ColorAdjustType)

Clears the threshold value for a specified category.

System_CAPS_pubmethodClone()

Creates an exact copy of this ImageAttributes object.

System_CAPS_pubmethodDispose()

Releases all resources used by this ImageAttributes object.

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Overrides Object::Finalize().)

System_CAPS_pubmethodGetAdjustedPalette(ColorPalette^, ColorAdjustType)

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

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSetBrushRemapTable(array<ColorMap^>^)

Sets the color-remap table for the brush category.

System_CAPS_pubmethodSetColorKey(Color, Color)

Sets the color key for the default category.

System_CAPS_pubmethodSetColorKey(Color, Color, ColorAdjustType)

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

System_CAPS_pubmethodSetColorMatrices(ColorMatrix^, ColorMatrix^)

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

System_CAPS_pubmethodSetColorMatrices(ColorMatrix^, ColorMatrix^, ColorMatrixFlag)

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

System_CAPS_pubmethodSetColorMatrices(ColorMatrix^, ColorMatrix^, ColorMatrixFlag, ColorAdjustType)

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

System_CAPS_pubmethodSetColorMatrix(ColorMatrix^)

Sets the color-adjustment matrix for the default category.

System_CAPS_pubmethodSetColorMatrix(ColorMatrix^, ColorMatrixFlag)

Sets the color-adjustment matrix for the default category.

System_CAPS_pubmethodSetColorMatrix(ColorMatrix^, ColorMatrixFlag, ColorAdjustType)

Sets the color-adjustment matrix for a specified category.

System_CAPS_pubmethodSetGamma(Single)

Sets the gamma value for the default category.

System_CAPS_pubmethodSetGamma(Single, ColorAdjustType)

Sets the gamma value for a specified category.

System_CAPS_pubmethodSetNoOp()

Turns off color adjustment for the default category. You can call the ClearNoOp method to reinstate the color-adjustment settings that were in place before the call to the SetNoOp method.

System_CAPS_pubmethodSetNoOp(ColorAdjustType)

Turns off color adjustment for a specified category. You can call the ClearNoOp method to reinstate the color-adjustment settings that were in place before the call to the SetNoOp method.

System_CAPS_pubmethodSetOutputChannel(ColorChannelFlag)

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

System_CAPS_pubmethodSetOutputChannel(ColorChannelFlag, ColorAdjustType)

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

System_CAPS_pubmethodSetOutputChannelColorProfile(String^)

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

System_CAPS_pubmethodSetOutputChannelColorProfile(String^, ColorAdjustType)

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

System_CAPS_pubmethodSetRemapTable(array<ColorMap^>^)

Sets the color-remap table for the default category.

System_CAPS_pubmethodSetRemapTable(array<ColorMap^>^, ColorAdjustType)

Sets the color-remap table for a specified category.

System_CAPS_pubmethodSetThreshold(Single)

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

System_CAPS_pubmethodSetThreshold(Single, ColorAdjustType)

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

System_CAPS_pubmethodSetWrapMode(WrapMode)

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.

System_CAPS_pubmethodSetWrapMode(WrapMode, 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.

System_CAPS_pubmethodSetWrapMode(WrapMode, Color, Boolean)

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.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

An ImageAttributes object maintains several color-adjustment settings, including color-adjustment matrices, grayscale-adjustment matrices, gamma-correction values, color-map tables, and color-threshold values. During rendering, colors can be corrected, darkened, lightened, and removed. To apply such manipulations, initialize an ImageAttributes object and pass the path of that ImageAttributes object (along with the path of an Image) to the DrawImage method.

The following example takes an image that is all one color (0.2, 0.0, 0.4, 1.0) and doubles the red component adds 0.2 to the red, green, and blue components

The following illustration shows the original image on the left and the transformed image on the right.

Colors

The code in the following example uses the following steps to perform the recoloring:

  1. Initialize a ColorMatrix object.

  2. Create an ImageAttributes object and pass the ColorMatrix object to the SetColorMatrix method of the ImageAttributes object.

  3. Pass the ImageAttributes object to the DrawImage method of a Graphics object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft