Initializes a new instance of the FreeImageBitmap class bases on the specified image with the specified size.

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

Syntax

C#
public FreeImageBitmap(
	Image original,
	int width,
	int height
)
Visual Basic (Declaration)
Public Sub New ( _
	original As Image, _
	width As Integer, _
	height As Integer _
)
Visual C++
public:
FreeImageBitmap(
	Image^ original, 
	int width, 
	int height
)

Parameters

original
Type: System.Drawing..::.Image
The original to clone from.
width
Type: System..::.Int32
The width, in pixels, of the new FreeImageBitmap.
height
Type: System..::.Int32
The height, in pixels, of the new FreeImageBitmap.

Remarks

Although this constructor supports creating images in both formats Format32bppPArgb and Format64bppPArgb, bitmaps created in these formats are treated like any normal 32-bit RGBA and 64-bit RGBA images respectively. Currently, there is no support for automatic premultiplying images in FreeImageBitmap.

Exceptions

ExceptionCondition
System..::.ExceptionThe operation failed.
System..::.ArgumentNullException original is a null reference.
System..::.ArgumentOutOfRangeException width or height are less or equal zero.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also