SKColorTable Class

Definition

Warning

This API is now obsolete.

Holds a premultiplied color table for indexed 8-bit bitmaps.

[System.Obsolete("The Index8 color type and color table is no longer supported.")]
public class SKColorTable : SkiaSharp.SKObject
Inheritance
Attributes

Remarks

This class is used to represent a color lookup table for indexed bitmap images. The table can contain up to MaxLength (256) colors (8 bits). The colors are stored are premultiplied 32-bit colors.

Constructors

SKColorTable()

Creates a new, empty color table with 256 empty elements.

SKColorTable(Int32)

Creates a color table with the specified number of elements, with empty colors.

SKColorTable(SKColor[])

Creates a color table with the provided unpremultiplied colors, up to MaxLength (256) colors can be provided.

SKColorTable(SKColor[], Int32)

Creates a color table with the provided unpremultiplied colors, but only consumes the first count elements from the colors array.

SKColorTable(SKPMColor[])

Creates a color table with the provided premultiplied colors, up to MaxLength (256) colors can be provided.

SKColorTable(SKPMColor[], Int32)

Creates a color table with the provided premultiplied colors, but only consumes the first count elements from the colors array.

Fields

MaxLength

Gets the maximum number of colors in the color lookup table.

Properties

Colors

Gets a copy of the premultiplied colors in the color table.

Count

Gets the number of colors in the lookup table.

Handle

Gets or sets the handle to the underlying native object.

(Inherited from SKObject)
Item[Int32]

Gets the premultiplied color at the specified index.

OwnsHandle

Gets a value indicating whether this object should destroy the underlying native object.

(Inherited from SKObject)
UnPreMultipledColors

Gets a copy of the unpremultiplied colors in the color table.

Methods

Dispose()

Releases all resources used by this SKNativeObject.

(Inherited from SKNativeObject)
Dispose(Boolean)

Releases the unmanaged resources used by the SKColorTable and optionally releases the managed resources.

GetUnPreMultipliedColor(Int32)

Returns the unpremultiplied color at the specified index.

ReadColors()

Returns an unmanaged pointer to the color lookup table.

Applies to