Exchanges two colors in the image.

Namespace:  SGP.XUtility
Assembly:  SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718

Syntax

C#
public static Bitmap ExchangeColors(
	Image image,
	Color oldColor,
	Color newColor
)

Parameters

image
Type: System.Drawing..::.Image
Image.
oldColor
Type: System.Drawing..::.Color
The first color.
newColor
Type: System.Drawing..::.Color
The second color

Return Value

A new bitmap Bitmap with recolored colors.

Exceptions

ExceptionCondition
System..::.ArgumentNullException image is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also