FreeImage.NET Class Library Reference
FreeImageBitmap Constructor (Int32, Int32, PixelFormat) |
Initializes a new instance of the FreeImageBitmap class bases on the specified size and format.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public FreeImageBitmap( int width, int height, PixelFormat format )
Parameters
- width
- Type: SystemInt32
The width, in pixels, of the new FreeImageBitmap. - height
- Type: SystemInt32
The height, in pixels, of the new FreeImageBitmap. - format
- Type: System.Drawing.ImagingPixelFormat
The PixelFormat enumeration for the new FreeImageBitmap.
Exceptions
Exception | Condition |
---|---|
Exception | The operation failed. |
ArgumentException | format is invalid. |
ArgumentOutOfRangeException | width or height are less or equal zero. |
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.
See Also