I am trying to create a class based on TGraphic but I need a little more info.
Is there a way to emulate LoadFromStream and SaveToStream methods in the SDK?
gflLoadBitmapFromHandle() looks as if it can handle that sort of thing, but I am not sure --nor do I know what each parameter means in real life. Especially the 'handle: GFL_HANDLE'.
Cheers,
Adem
LoadFromStream/SaveToStream (Delphi)
Moderators: XnTriq, helmut, xnview
Re: LoadFromStream/SaveToStream
I went around this by simply saving the stream to a temp file and then have libgfl load/save the file.
Matthias
Matthias
Re: TGraphic
Do you think about releasing your TGraphic descendant? I would be interested in replacing my own with a better one
Matthias
Matthias
Second question first: Yes, of course I will/would publish it. I dont see any reason why I should keep it private.
Now, the first: I hate using disk for that sort operation. It defeats the whole idea of being a fast lib --all we end up with is a cludge.
Once I get some answer to this loadstream/savestream issue, my next target will be using TSharedImage since TGraphic uses it quite cleverly to speed up Assign().
Cheers,
Adem
Now, the first: I hate using disk for that sort operation. It defeats the whole idea of being a fast lib --all we end up with is a cludge.
Once I get some answer to this loadstream/savestream issue, my next target will be using TSharedImage since TGraphic uses it quite cleverly to speed up Assign().
Cheers,
Adem
-
- Author of XnView
- Posts: 45066
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: LoadFromStream/SaveToStream [Delphi]
Hello,
Regards. Pierre.
Yes, you must use gflLoadBitmapFromHandle. GFL_HANDLE is a pointer of your data. If you know C/C++, there is an example.Adem wrote:Is there a way to emulate LoadFromStream and SaveToStream methods in the SDK?
gflLoadBitmapFromHandle() looks as if it can handle that sort of thing, but I am not sure --nor do I know what each parameter means in real life. Especially the 'handle: GFL_HANDLE'.
Regards. Pierre.
-
- Posts: 7
- Joined: Wed Feb 09, 2005 9:36 am
gflLoadBitmapFromHandle with Delphi..a few lines of code ple
Hi Pierre
Could you please give us Delphi-programmers a few lines of code that shows us how to use gflLoadBitmapFromHandle
I got
If this is right so far, what to add for the two questionmarks ??
If not at all, please a few lines that shows the use of gflLoadBitmapFromHandle
Thanks and kind Regards
Jansen
Could you please give us Delphi-programmers a few lines of code that shows us how to use gflLoadBitmapFromHandle
I got
Code: Select all
ms := tmmorystream.creat
try
........
image1.picture.bitmap.savetostream(ms);
e := gflLoadBitmapFromHandle( ?? , gfl_bmp, lp, fInfo);
.........
finally
ms.free;
end;
If not at all, please a few lines that shows the use of gflLoadBitmapFromHandle
Thanks and kind Regards
Jansen