CreateFromStream(Stream: IIOStream);
CreateFromStream(Stream: System.IO.Stream);
Stream. The stream that contains the image.
The CreateFromStream constructor creates a new image with fixed areas from the stream contents passed by the Stream parameter.
Function GetTransformImageFromStream(ImgStream: IIOStream; MLeft: Double; MTop: Double; MRight: Double; MBottom: Double): IGxRectangleTransformImage;
Var
OutImg: IGxRectangleTransformImage;
Margins: IGxMargins;
Begin
If ImgStream.Size <> 0 Then
OutImg := New GxRectangleTransformImage.CreateFromStream(ImgStream);
Margins := OutImg.Margins;
Margins.Bottom := MBottom;
Margins.Left := MLeft;
Margins.Right := MRight;
Margins.Top := MTop;
Return OutImg;
Else
Return Null;
End If;
End Function GetTransformImageFromStream;
The function returns the image obtained from the stream. The image is transformed by entering fixed areas, which sizes are passed as input parameters.
Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;
Function GetTransformImageFromStream(ImgStream: Stream; MLeft: Double; MTop: Double; MRight: Double; MBottom: Double): GxRectangleTransformImage;
Var
OutImg: GxRectangleTransformImage;
Margins: IGxMargins;
Begin
If ImgStream.Length <> 0 Then
OutImg := New GxRectangleTransformImageClass_2();
OutImg.CreateFromStream(ImgStream);
Margins := OutImg.Margins;
Margins.Bottom := MBottom;
Margins.Left := MLeft;
Margins.Right := MRight;
Margins.Top := MTop;
Return OutImg;
Else
Return Null;
End If;
End Function;
The function returns the image obtained from the stream. The image is transformed by entering fixed areas, which sizes are passed as input parameters.
See also: