FreeImage.NET Class Library Reference
FreeImageSaveToStream Method (FIBITMAP, Stream, FREE_IMAGE_FORMAT) |
Saves a previously loaded FreeImage bitmap to a stream.
The stream must be set to the correct position before calling SaveToStream.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static bool SaveToStream( FIBITMAP dib, Stream stream, FREE_IMAGE_FORMAT format )
Parameters
- dib
- Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap. - stream
- Type: System.IOStream
The stream to write to. - format
- Type: FreeImageAPIFREE_IMAGE_FORMAT
Format of the image.
Return Value
Type: BooleanReturns true on success, false on failure.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | dib or stream is null. |
ArgumentException | stream cannot write. |
See Also