Initializes a new instance of the FreeImageBitmap class bases on the specified size and format.
Namespace:
FreeImageAPIAssembly: FreeImageNET (in FreeImageNET.dll)
Syntax
C# |
---|
public FreeImageBitmap( int width, int height, PixelFormat format ) |
Visual Basic (Declaration) |
---|
Public Sub New ( _ width As Integer, _ height As Integer, _ format As PixelFormat _ ) |
Visual C++ |
---|
public: FreeImageBitmap( int width, int height, PixelFormat format ) |
Parameters
- width
- Type: System..::.Int32
The width, in pixels, of the new FreeImageBitmap.
- height
- Type: System..::.Int32
The height, in pixels, of the new FreeImageBitmap.
- format
- Type: System.Drawing.Imaging..::.PixelFormat
The PixelFormat enumeration for 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
Exception | Condition |
---|---|
System..::.Exception | The operation failed. |
System..::.ArgumentException | format is invalid. |
System..::.ArgumentOutOfRangeException | width or height are less or equal zero. |