Set the file background color of an image. When saving an image to PNG, this background color is transparently saved to the PNG file.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static bool SetBackgroundColor(
	FIBITMAP dib,
	ref RGBQUAD bkcolor
)
Visual Basic (Declaration)
Public Shared Function SetBackgroundColor ( _
	dib As FIBITMAP, _
	ByRef bkcolor As RGBQUAD _
) As Boolean
Visual C++
public:
static bool SetBackgroundColor(
	FIBITMAP dib, 
	RGBQUAD% bkcolor
)

Parameters

dib
Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
bkcolor
Type: FreeImageAPI..::.RGBQUAD %
The new background color.

Return Value

Returns true on success, false on failure.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also