This documentation is archived and is not being maintained.

ImageAttributes.SetOutputChannel Method (ColorChannelFlag)

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

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

public void SetOutputChannel (
	ColorChannelFlag flags
)
public void SetOutputChannel (
	ColorChannelFlag flags
)
public function SetOutputChannel (
	flags : ColorChannelFlag
)
Not applicable.

Parameters

flags

An element of ColorChannelFlag that specifies the output channel.

Return Value

This method does not return a value.

You can use the SetOutputChannel method to convert an image to a CMYK color space and examine the intensities of one of the CMYK color channels. For example, suppose you create an ImageAttributes object and set its bitmap output channel to ColorChannelC. If you pass the path of that ImageAttributes object to the DrawImage method, the cyan component of each pixel is calculated, and each pixel in the rendered image is a shade of gray that indicates the intensity of its cyan channel. Similarly, you can render images that indicate the intensities of the magenta, yellow, and black channels.

An ImageAttributes object maintains color and grayscale settings for five adjustment categories: default, bitmap, brush, pen, and text. For example, you can specify an output channel for the default category and a different output channel for the bitmap category.

The default color-adjustment and grayscale-adjustment settings apply to all categories that do not have adjustment settings of their own. For example, if you never specify any adjustment settings for the bitmap category, the default settings apply to the bitmap category.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: