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)
|Visual Basic (Declaration)|
public: static unsigned int ApplyPaletteIndexMapping( FIBITMAP dib, array<unsigned char>^ srcindices, array<unsigned char>^ dstindices, unsigned int count, bool swap )
- Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
- Type: array<
Array of palette indices to be used as the mapping source.
- Type: array<
Array of palette indices to be used as the mapping destination.
- Type: System..::.UInt32
The number of palette indices to be mapped. This is the size of both srcindices and dstindices
- Type: System..::.Boolean
If true, source and destination palette indices are swapped, that is, each destination index is also mapped to the corresponding source index.
Return ValueThe total number of pixels changed.
This function maps up to count palette indices specified in srcindices to these specified in dstindices. Thereby, index srcindices[N], if present in the image, will be replaced by index dstindices[N]. If swap is true, additionally all indices specified in dstindices are also mapped to these specified in srcindices. The function returns the number of pixels changed or zero, if no pixels were changed. Both arrays srcindices and dstindices are assumed not to hold less than count indices. Note, that this behaviour is different from what ApplyColorMapping(FIBITMAP, array<RGBQUAD>(), array<RGBQUAD>(), UInt32, Boolean, Boolean) does, which modifies the actual image data on palletized images.