Swaps two specified 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 SwapColors(
	RGBQUAD color_a,
	RGBQUAD color_b,
	bool ignore_alpha
)
Visual Basic (Declaration)
Public Function SwapColors ( _
	color_a As RGBQUAD, _
	color_b As RGBQUAD, _
	ignore_alpha As Boolean _
) As UInteger
Visual C++
public:
unsigned int SwapColors(
	RGBQUAD color_a, 
	RGBQUAD color_b, 
	bool ignore_alpha
)

Parameters

color_a
Type: FreeImageAPI..::.RGBQUAD
One of the two colors to be swapped.
color_b
Type: FreeImageAPI..::.RGBQUAD
The other of the two colors to be swapped.
ignore_alpha
Type: System..::.Boolean
If true, 32-bit images and colors are treated as 24-bit.

Return Value

The total number of pixels changed.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also