FreeImage.NET Class Library Reference
FreeImageBitmapApplyPaletteIndexMapping Method |
Applies palette index mapping for one or several indices
on a 1-, 4- or 8-bit palletized image.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public uint ApplyPaletteIndexMapping( byte[] srcindices, byte[] dstindices, uint count, bool swap )
Parameters
- srcindices
- Type: SystemByte
Array of palette indices to be used as the mapping source. - dstindices
- Type: SystemByte
Array of palette indices to be used as the mapping destination. - count
- Type: SystemUInt32
The number of palette indices to be mapped. This is the size of both srcindices and dstindices - swap
- Type: SystemBoolean
If true, source and destination palette indices are swapped, that is, each destination index is also mapped to the corresponding source index.
Return Value
Type: UInt32The total number of pixels changed.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | srccolors or dstcolors is a null reference. |
ArgumentException | srccolors has a different length than dstcolors. |
See Also