[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.GcBitmap.GenerateOctreePalette

GenerateOctreePalette Method

GenerateOctreePalette(int, bool)

Generates a palette for the image using the Octree quantizer algorithm.

The Alpha color channel is ignored.

Declaration
public uint[] GenerateOctreePalette(int maxColors, bool skipTransparentPixels = false)
Public Function GenerateOctreePalette(maxColors As Integer, Optional skipTransparentPixels As Boolean = False) As UInteger()
Parameters
Type Name Description
int maxColors

The maximum number of opaque colors in the palette, from 8 and above.

bool skipTransparentPixels

Indicates if the pixels with value of alpha less than 128 shouldn't be taken into account.

Returns
Type Description
uint[]

The resulting array with palette colors.