[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.GcBitmap.ToIndexed8bppBitmap

ToIndexed8bppBitmap Method

ToIndexed8bppBitmap(int, bool)

Creates an opaque Indexed8bppBitmap from the current image using the Octree quantizer algorithm.

Declaration
public Indexed8bppBitmap ToIndexed8bppBitmap(int maxColors, bool appendTransparentColor = false)
Public Function ToIndexed8bppBitmap(maxColors As Integer, Optional appendTransparentColor As Boolean = False) As Indexed8bppBitmap
Parameters
Type Name Description
int maxColors

The maximum number of opaque colors in the palette, from 8 to 256.

bool appendTransparentColor

Indicates if a transparent color should be added to the palette, if the image is not opaque and the number of opaque colors is less than 256.

Returns
Type Description
Indexed8bppBitmap

A new instance of Indexed8bppBitmap.

ToIndexed8bppBitmap(uint[], DitheringMethod, bool)

Creates an opaque Indexed8bppBitmap from the current image using the specified palette.

Declaration
public Indexed8bppBitmap ToIndexed8bppBitmap(uint[] palette, DitheringMethod ditheringMethod, bool appendTransparentColor = false)
Public Function ToIndexed8bppBitmap(palette As UInteger(), ditheringMethod As DitheringMethod, Optional appendTransparentColor As Boolean = False) As Indexed8bppBitmap
Parameters
Type Name Description
uint[] palette

The palette with opaque colors for the new image (colors are in 32-bit ARGB format). Elements with index 256 and above are ignored.

DitheringMethod ditheringMethod

The method of two-dimensional error diffusion dithering.

bool appendTransparentColor

Indicates if a transparent color should be added to the palette, if the image is not opaque and the number of opaque colors is less than 256.

Returns
Type Description
Indexed8bppBitmap

A new instance of Indexed8bppBitmap.

ToIndexed8bppBitmap(DitheringMethod)

Creates an Indexed8bppBitmap from the current image.

Declaration
public Indexed8bppBitmap ToIndexed8bppBitmap(DitheringMethod ditheringMethod)
Public Function ToIndexed8bppBitmap(ditheringMethod As DitheringMethod) As Indexed8bppBitmap
Parameters
Type Name Description
DitheringMethod ditheringMethod

The method of two-dimensional error diffusion dithering.

Returns
Type Description
Indexed8bppBitmap

A new instance of Indexed8bppBitmap.