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)

Syntax

C#
public uint ApplyColorMapping(
	RGBQUAD[] srccolors,
	RGBQUAD[] dstcolors,
	bool ignore_alpha,
	bool swap
)
Visual Basic (Declaration)
Public Function ApplyColorMapping ( _
	srccolors As RGBQUAD(), _
	dstcolors As RGBQUAD(), _
	ignore_alpha As Boolean, _
	swap As Boolean _
) As UInteger
Visual C++
public:
unsigned int ApplyColorMapping(
	array<RGBQUAD>^ srccolors, 
	array<RGBQUAD>^ dstcolors, 
	bool ignore_alpha, 
	bool swap
)

Parameters

srccolors
Type: array< FreeImageAPI..::.RGBQUAD >[]()[]
Array of colors to be used as the mapping source.
dstcolors
Type: array< FreeImageAPI..::.RGBQUAD >[]()[]
Array of colors to be used as the mapping destination.
ignore_alpha
Type: System..::.Boolean
If true, 32-bit images and colors are treated as 24-bit.
swap
Type: System..::.Boolean
If true, source and destination colors are swapped, that is, each destination color is also mapped to the corresponding source color.

Return Value

The total number of pixels changed.

Exceptions

ExceptionCondition
System..::.ArgumentNullException srccolors or dstcolors is a null reference.
System..::.ArgumentException srccolors has a different length than dstcolors.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also