ChannelsProvider.SetAlpha Method (Single)

Sets the alpha channel to the current bitmap.

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

Syntax

C#
public void SetAlpha(
	float opacity
)

Parameters

opacity

Type: System.Single

The opacity (in range [0, 1]) to initialize the alpha channel with. Depending on the channel color 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 class.

See Also

Reference