[]
Creates an opaque Indexed4bppBitmap from the current image using the Octree quantizer algorithm.
public Indexed4bppBitmap ToIndexed4bppBitmap(int maxColors, bool appendTransparentColor = false, bool lowerBitsFirst = false)
Public Function ToIndexed4bppBitmap(maxColors As Integer, Optional appendTransparentColor As Boolean = False, Optional lowerBitsFirst As Boolean = False) As Indexed4bppBitmap
Type | Name | Description |
---|---|---|
int | maxColors | The maximum number of opaque colors in the palette, from 8 to 16. |
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 16. |
bool | lowerBitsFirst | If true, pixels are arranged within a byte such that pixels with lower column indices are stored in the lower-order bit tetrads of the byte. |
Type | Description |
---|---|
Indexed4bppBitmap | A new instance of Indexed4bppBitmap. |
Creates an opaque Indexed4bppBitmap from the current image using the specified palette.
public Indexed4bppBitmap ToIndexed4bppBitmap(uint[] palette, DitheringMethod ditheringMethod, bool appendTransparentColor = false, bool lowerBitsFirst = false)
Public Function ToIndexed4bppBitmap(palette As UInteger(), ditheringMethod As DitheringMethod, Optional appendTransparentColor As Boolean = False, Optional lowerBitsFirst As Boolean = False) As Indexed4bppBitmap
Type | Name | Description |
---|---|---|
uint[] | palette | The palette with opaque colors for the new image (colors are in 32-bit ARGB format). Elements with index 16 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 16. |
bool | lowerBitsFirst | If true, pixels are arranged within a byte such that pixels with lower column indices are stored in the lower-order bit tetrads of the byte. |
Type | Description |
---|---|
Indexed4bppBitmap | A new instance of Indexed4bppBitmap. |
Creates an Indexed4bppBitmap from the current image.
public Indexed4bppBitmap ToIndexed4bppBitmap(DitheringMethod ditheringMethod, bool lowerBitsFirst = false)
Public Function ToIndexed4bppBitmap(ditheringMethod As DitheringMethod, Optional lowerBitsFirst As Boolean = False) As Indexed4bppBitmap
Type | Name | Description |
---|---|---|
DitheringMethod | ditheringMethod | The method of two-dimensional error diffusion dithering. |
bool | lowerBitsFirst | If true, pixels are arranged within a byte such that pixels with lower column indices are stored in the lower-order bit tetrads of the byte. |
Type | Description |
---|---|
Indexed4bppBitmap | A new instance of Indexed4bppBitmap. |