Recolors the image (Image).

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

Syntax

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

Parameters

image
Type: System.Drawing..::.Image
Image to be recolored.
oldColor
Type: System.Drawing..::.Color
The old color.
newColor
Type: System.Drawing..::.Color
The new color.

Return Value

A new bitmap (Bitmap) with recolored colors.

Remarks

The method recolors in image with the old color to the new one and returns as a new image (Bitmap).

Exceptions

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

See Also