Loading directly from stream
Moderators: SDS, support, admin
Loading directly from stream
Hi,
a short question regarding TsgImage.
Is directly loading with a filestream (downloaded plt-file)
for TsgImage possible ?
Thank's in advance
US
a short question regarding TsgImage.
Is directly loading with a filestream (downloaded plt-file)
for TsgImage possible ?
Thank's in advance
US
Hello,
Please try the following example:
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Please try the following example:
Code: Select all
<b>uses</b>
... HPGL2, SGImage;
<b>type</b>
TForm1 = <b>class</b>(TForm)
...
btnOpen: TButton;
sgImage1: TsgImage;
<b>procedure</b> btnOpenClick(Sender: TObject);
<b>private</b>
...
...
<b>procedure</b> TForm1.btnOpenClick(Sender: TObject);
<b>var</b>
vFileStream: TFileStream;
vImage: TsgHPGLImage;
<b>begin</b>
vFileStream := TFileStream.Create(<font color="blue">'c:\Test.plt'</font id="blue">, fmOpenRead);
vImage := TsgHPGLImage.Create;
vImage.LoadFromStream(vFileStream);
vFileStream.Free;
sgImage1.Picture.Graphic := vImage;
vImage.Free;
<b>end</b>;
<b>end</b>.
Please post questions to the forum or write to support@cadsofttools.com