Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
roberto
Posted - Oct 01 2015 : 17:51:10 TImageEnDbVect
how can I save all vector and background into a jpg?
Thanks
Roberto
7 L A T E S T R E P L I E S (Newest First)
roberto
Posted - Oct 03 2015 : 14:16:00 Hi Nigel, I think this may be my solution it seem to be quite simple to créate a custom report component.
I do not expect you to bother with it, but I think it would enrich your tools, after all there lots of user outthere that use fastreport. here is the link in case someone need to do it as well.
Posted - Oct 03 2015 : 04:30:01 Hi Nigel I do not quite understand what you mean, loading and saving it? I could optimize code by removing "v.RemoveAllObjects;" and "v.Update;" as I will not uses the temp "V" variable any futher but I still need to save the image in order for fastreport to be abled to load it in the report. Plase note that the reason to uses "V2 is not to change the ImageEnDBVect1 as is link to a table. May I ask you if you know any third party that will allow me to uses any of your component with fastreport?
Thanks Roberto
xequte
Posted - Oct 02 2015 : 13:49:55 Hi
You don't need to load and save the image to access it. After calling CopyObjectsToBack you can just assign your TImageEnVect.IEBitmap/TImageEnVect.Bitmap.
Posted - Oct 02 2015 : 11:28:09 I guess this is the best that can be done?
procedure TFmant.btn1Click(Sender: TObject);
var V:TImageEnVect;
begin
inherited;
// need to create a temp TImageEnVect in order not to touch the ImageEnDBVect1 that is link to a table
v:=TImageEnVect.create(Self);
Try
v.Assign(ImageEnDBVect1);
v.CopyObjectsToBack(True);
v.RemoveAllObjects;
v.Update;
v.io.SaveToFile('c:\pic.jpg');
Finally
v.free;
End;
end;
roberto
Posted - Oct 02 2015 : 10:09:23 basicaly what I want to do is to print it in a report (fastreport) as there is no way to so except by saving it into a jpg and then reading the jpg image from the report.
w2m
Posted - Oct 01 2015 : 17:59:34 Although I have not tested with TImageEnDBVect, you should be able to do this by copying the objects to the image, remove all objects and save to file like TImageEnVect:
If you mean you want to save all the objects and the background image so the objects can be loaded from the file then use SaveToFileAll and LoadToFileAll: