FreeImage.NET Class Library Reference
FreeImageBitmapApplyColorMapping Method |
Applies color mapping for one or several colors on a 1-, 4- or 8-bit
palletized or a 16-, 24- or 32-bit high color image.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public uint ApplyColorMapping( RGBQUAD[] srccolors, RGBQUAD[] dstcolors, bool ignore_alpha, bool swap )
Parameters
- srccolors
- Type: FreeImageAPIRGBQUAD
Array of colors to be used as the mapping source. - dstcolors
- Type: FreeImageAPIRGBQUAD
Array of colors to be used as the mapping destination. - ignore_alpha
- Type: SystemBoolean
If true, 32-bit images and colors are treated as 24-bit. - swap
- Type: SystemBoolean
If true, source and destination colors are swapped, that is, each destination color is also mapped to the corresponding source color.
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