ColorPalette.SetKeyColor Method (RgbColor)

Makes a palette entry which is closest to a given color transparent.

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

Syntax

C#
public void SetKeyColor(
	RgbColor color
)

Parameters

color

Type: Aurigma.GraphicsMill.RgbColor

A RgbColor which should be transparent.

Remarks

Alpha channel of a given entry will be dropped to 0, alpha channels of all other entries will be set to 255. This way palette will contain a single transparent color.

This method can be treated as analogue of Transparentize transform for non-indexed image.

Note

Setting transparent index works noticeable faster than setting transparent color (which actually calls slow FindNearestIndex(RgbColor) method). That's why it is highly recommended to pass index instead of color if possible.

See Also

Reference