FreeImage.NET Class Library Reference
FreeImageBitmap Constructor (Int32, Int32, Int32, Int32, FREE_IMAGE_TYPE, IntPtr) |
Initializes a new instance of the FreeImageBitmap class bases on the specified size,
pixel format and pixel data.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public FreeImageBitmap( int width, int height, int stride, int bpp, FREE_IMAGE_TYPE type, IntPtr scan0 )
Parameters
- width
- Type: SystemInt32
The width, in pixels, of the new FreeImageBitmap. - height
- Type: SystemInt32
The height, in pixels, of the new FreeImageBitmap. - stride
- Type: SystemInt32
Integer that specifies the byte offset between the beginning of one scan line and the next. This is usually (but not necessarily) the number of bytes in the pixel format (for example, 2 for 16 bits per pixel) multiplied by the width of the bitmap. The value passed to this parameter must be a multiple of four.. - bpp
- Type: SystemInt32
The color depth of the new FreeImageBitmap - type
- Type: FreeImageAPIFREE_IMAGE_TYPE
The type for the new FreeImageBitmap. - scan0
- Type: SystemIntPtr
Pointer to an array of bytes that contains the pixel data.
Exceptions
Exception | Condition |
---|---|
Exception | The operation failed. |
ArgumentException | format is invalid. |
ArgumentOutOfRangeException | width or height are less or equal zero. |
See Also