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.AddAlpha Method (Single)

Appends alpha channel to current bitmap.

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

Syntax

Visual Basic
Public Sub AddAlpha ( _
	opacity As Single _
)
C#
public void AddAlpha(
	float opacity
)

Parameters

opacity

Type: System.Single

Opacity value to initialize alpha channel with. Valid values are in range [0, 1]. Depending on channel bit depth this value is normalized to 255 (for non-extended 8 bits per channel pixel formats) or to 65535 (for extended 16 bits per channel pixel formats).

Remarks

If alpha channel is already presented in the bitmap, this method will throw an exception. To check if alpha channel is available, use HasAlpha property of the Bitmap.

Examples

Visual Basic
bitmap.Channels.AddAlpha(0.4F)
C#
bitmap.Channels.AddAlpha(0.4f);

See Also

Reference