Send Tsgimage picture To QrImage
Moderators: SDS, support, admin
Send Tsgimage picture To QrImage
I can load a dxf file to a tsgimage and show on my
delphi form.
Now I need to send this Tsgimage.picture to
a Qrimage in Quickreport and preview the
report,how can I do?
I use follow code with no luck.Please help!
delphi form.
Now I need to send this Tsgimage.picture to
a Qrimage in Quickreport and preview the
report,how can I do?
I use follow code with no luck.Please help!
Code: Select all
<b>var</b>
vImg: TsgDXFImage;
StmImg: TMemoryStream;
<b>begin</b>
StmImg := TMemoryStream.Create;
<b>try</b>
vImg := TsgDXFImage(sgPaintBox.Picture.Graphic);
vImg.SaveToStream(StmImg);
QRImage1.Picture.Graphic.LoadFromStream(StmImg);
<font color="red">//this line got a AV</font id="red">
QuickRep1.preview;
<b>finally</b>
StmImg.Free;
<b>end</b>;
Hello,
Thank you for the question. Please try the following construction:
It is incorrect to give DXF data to QReport. It will not recognize it.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Thank you for the question. Please try the following construction:
Code: Select all
<b>var</b>
vBMP: TBitmap;
<b>begin</b>
vBMP := TBitmap.Create;
vBMP.SetBounds(0,0,800,600);
vImg := TsgDXFImage(sgPaintBox.Picture.Graphic);
vBMP.Canvas.StretchDraw(vBMP.Bounds, vImg);
QRImage1.Picture.Graphic := vBMP
.....
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Sorry for the mess.
Please use like the following:
QRImage1.Picture.Graphic := sgPaintBox.Picture.Graphic
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Please use like the following:
QRImage1.Picture.Graphic := sgPaintBox.Picture.Graphic
Sergey.
please post questions to the forum or write to support@cadsofttools.com