Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.
This documentation is for the old version. Go to the latest Graphics Mill docs

ChannelsProvider.Channel Property (ColorChannel)

Extracts/replaces specified bitmap channel to/with grayscale Bitmap.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Default Property Channel ( _
	colorChannel As ColorChannel _
) As Bitmap
C#
public Bitmap this[
	ColorChannel colorChannel
] { get; set; }

Parameters

colorChannel

Type: Aurigma.GraphicsMill.ColorChannel

ColorChannel value specifying an alias of channel to retrieve. Draw attention, it does not check color space, so if you pass, say, Yellow to RGB color, you will get a channel stored at the same index as yellow in CMYK (i.e. Green).

Property Value

Bitmap class instance specifying a bitmap channel. It always has the same dimensions as source bitmap and its pixel format is Format8bppGrayScale (if source bitmap is not extended) or Format16bppGrayScale (if source bitmap is extended).

Examples

Visual Basic
Dim red As Aurigma.GraphicsMill.Bitmap = _
 bitmap.Channels(Aurigma.GraphicsMill.ColorChannel.Red)
C#
Aurigma.GraphicsMill.Bitmap red =
    bitmap.Channels[Aurigma.GraphicsMill.ColorChannel.Red];
Visual Basic
bitmap.Channels(Aurigma.GraphicsMill.ColorChannel.Red) = red
C#
bitmap.Channels[Aurigma.GraphicsMill.ColorChannel.Red] = red;

See Also

Reference