FreeImage.NET Class Library Reference
![]() | FreeImageBitmap Constructor (Stream, FREE_IMAGE_FORMAT) |
Initializes a new instance of the FreeImageBitmap class
bases on the specified stream in the specified format.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)

C#
public FreeImageBitmap( Stream stream, FREE_IMAGE_FORMAT format )
Parameters
- stream
- Type: System.IOStream
Stream to read from. - format
- Type: FreeImageAPIFREE_IMAGE_FORMAT
Format of the image.

Exception | Condition |
---|---|
Exception | The operation failed. |
ArgumentNullException | stream is a null reference. |

You must keep the stream open for the lifetime of the FreeImageBitmap.
