Search found 3 matches

by ioio
Thu Nov 13, 2008 9:27 am
Forum: GFL SDK
Topic: How to use gflSaveBitmapIntoMemory in Delphi
Replies: 4
Views: 1955

I have found the bug. It's in the LibGfl.pas

Wrong:
function gflMemoryRealloc(var Ptr: Pointer; size: GFL_UINT32): Pointer; stdcall;
procedure gflMemoryFree(var Ptr: Pointer); stdcall;


Right:
function gflMemoryRealloc(Ptr: Pointer; size: GFL_UINT32): Pointer; stdcall;
procedure gflMemoryFree ...
by ioio
Thu Nov 13, 2008 8:28 am
Forum: GFL SDK
Topic: How to use gflSaveBitmapIntoMemory in Delphi
Replies: 4
Views: 1955

So what's the different? Thats exception is catched bay gflMemoryFree, so I see it only in debug mode, but no memory is freed.
When I make a loop ... for example:
for I := 0 to 500 do begin
e := gflSaveBitmapIntoMemory(Mem, @Size, gfl_bmp, sp);
FS.Write(Mem^,Size);
gflMemoryFree(Pointer(Mem ...
by ioio
Wed Nov 12, 2008 9:36 am
Forum: GFL SDK
Topic: How to use gflSaveBitmapIntoMemory in Delphi
Replies: 4
Views: 1955

How to use gflSaveBitmapIntoMemory in Delphi

Hi,
i have some issues with using gflSaveBitmapIntoMemory in Delphi, better say with freeing memory after that.

....
var Size:integer;
Mem:PGFL_UINT8;
sp: TGFL_SAVE_PARAMS;
e: GFL_ERROR;
FS:TFileStream;
.....
gflGetDefaultSaveParams(sp);
sp.FormatIndex := tiff;
sp.Compression := GFL_LZW;

e ...