Alpha blends an image with a background color;

Namespace: System.Extensions.Drawing
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static Image ToAlphaBlend(
	this Image image,
	int alpha,
	Color backgroundColor
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ToAlphaBlend ( 
	image As Image,
	alpha As Integer,
	backgroundColor As Color
) As Image
Visual C++
public:
[ExtensionAttribute]
static Image^ ToAlphaBlend(
	Image^ image, 
	int alpha, 
	Color backgroundColor
)
F#
static member ToAlphaBlend : 
        image : Image * 
        alpha : int * 
        backgroundColor : Color -> Image 

Parameters

image
Type: System.Drawing..::..Image
The Image to alpha blend.
alpha
Type: System..::..Int32
The alpha value to use when blending.
backgroundColor
Type: System.Drawing..::..Color
The background color to blend with.

Return Value

Type: Image
A new Image with the alpha blended image.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also