Makes palette entry closest to given color transparent.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub SetColorKey ( _ color As RgbColor _ )
public void SetColorKey( RgbColor color )
Alpha channel of given entry will be dropped to 0, alpha channels of all other entries will be set to 255. This way palette will contain only the single transparent index. This way palette will contain only the single transparent index. If you need more than one transparent entry, put transparent RgbColor into appropriate Item[Int32].
This method can be treated as analogue of Transparentize transform for non-indexed image.
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 where possible.
Dim red As Aurigma.GraphicsMill.RgbColor = _ Aurigma.GraphicsMill.RgbColor.Red palette.SetColorKey(red)
Aurigma.GraphicsMill.RgbColor red = Aurigma.GraphicsMill.RgbColor.Red; palette.SetColorKey(red);