CreateFromStream(Stream: IIOStream);
CreateFromStream(Stream: System.IO.Stream);
Stream. The stream that contains a bitmap.
The CreateFromStream constructor creates a new bitmap from the stream contents that is passed by the Stream parameter.
Function GetBmpFromStream(BmpStream: IIOStream): IGxBitmap;
Var
Bmp: IGxBitmap;
Begin
If BmpStream.Size <> 0 Then
Bmp := New GxBitmap.CreateFromStream(BmpStream);
Return Bmp;
Else
Return Null;
End If;
End Function GetBmpFromStream;
The function returns the image obtained from the stream, which is specified as an input parameter.
Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;
Function GetBmpFromStream(BmpStream: Stream): GxBitmap;
Var
Bmp: GxBitmap;
Begin
If BmpStream.Length <> 0 Then
Bmp := New GxBitmapClass_2();
Bmp.CreateFromStream(BmpStream);
Return Bmp;
Else
Return Null;
End If;
End Function;
This function returns the image obtained from the stream, which is specified as an input parameter.
See also: