Hello!!!
I have problems with the new version of the library.
My program works correctly with version 2.90 but with the current version seems to have a problem with gflLoadBitmapFromMemory.
Apparently, gflLoadBitmapFromMemory modify the content of other variables in the program. This is quite strange.
I will investigate further to see if an error in the function.
Regards...
Miguel Angel
http://imagen3d.site88.net
Error in gflLoadBitmapFromMemory ?
Moderators: XnTriq, helmut, xnview
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Re: Error in gflLoadBitmapFromMemory ?
I have solved the problem by declaring the variable in other place of the program.
The variables involved are of type Boolean
Regards...
Miguel Angel
http://imagen3d.site88.net
The variables involved are of type Boolean
Regards...
Miguel Angel
http://imagen3d.site88.net
-
- Posts: 72
- Joined: Thu Nov 08, 2007 9:22 am
Re: Error in gflLoadBitmapFromMemory ?
Hello,
You should post some code with wrong memory access so I can do similar tests
See ya,
You should post some code with wrong memory access so I can do similar tests
See ya,
Dom
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Re: Error in gflLoadBitmapFromMemory ?
Hello!!!...
To save an image in memory I use the code:
In another part of the program:
After running the function, the variable (Imagen1LbExiste) becomes false.
I have solved the problem by declaring the variable in a different unit.
I work with TurboDelphi:
Regards...
Miguel Angel
http://imagen3d.site88.net
To save an image in memory I use the code:
Code: Select all
unit Principal;
....
var
Imagen1LbStream : TMemoryStream;
Imagen1LbExiste : Boolean;
...
implementation
....
procedure TFormPrincipal.Action37Execute(Sender: TObject);
var
Size : integer;
Mem : PGFL_UINT8;
spMem : TGFL_SAVE_PARAMS;
...
begin
....
gflGetDefaultSaveParams(spMem);
spMem.FormatIndex := gflGetFormatIndexByName('bmp');
gflSaveBitmapIntoMemory(Mem,@Size,gfl_bmp1Lb,spMem);
Imagen1LbStream.Clear;
Imagen1LbStream.Write(Mem^,Size);
gflMemoryFree(Pointer(Mem));
gflFreeBitmapData(gfl_bmp1Lb); //Se libera porque ya se ha usado en cargar las imágenes
Imagen1LbExiste := True;
end;
In another part of the program:
Code: Select all
gflFreeBitmapData(gfl_bmp1Lb);
gflLoadBitmapFromMemory(Imagen1LbStream.Memory, Imagen1LbStream.Size,gfl_bmp1Lb, lp1Lb, finfo1Lb);
I have solved the problem by declaring the variable in a different unit.
I work with TurboDelphi:
Regards...
Miguel Angel
http://imagen3d.site88.net
-
- Author of XnView
- Posts: 44304
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Re: Error in gflLoadBitmapFromMemory ?
No, apparently I have the problem with gflLoadBitmapFromMemory.
Miguel Angel
Miguel Angel
-
- Posts: 72
- Joined: Thu Nov 08, 2007 9:22 am
Re: Error in gflLoadBitmapFromMemory ?
I test this functions without this kind of error.
There might be something wrong elsewhere in your code ?
Do you test the same code in a small project with only this features ?
There might be something wrong elsewhere in your code ?
Do you test the same code in a small project with only this features ?
Dom
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Re: Error in gflLoadBitmapFromMemory ?
Hello,
I will continue doing tests to try to determine under what conditions these errors occur.
The program is quite dense and heavy and uses a large amount of memory and variables. I will make a program easier for to try to reproduce the error.
Miguel Angel
I will continue doing tests to try to determine under what conditions these errors occur.
The program is quite dense and heavy and uses a large amount of memory and variables. I will make a program easier for to try to reproduce the error.
Miguel Angel
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Re: Error in gflLoadBitmapFromMemory ?
Hi,
this time I'm having problems with gflLoadBitmap.
'Access violation at address 00984784 in module libgfl311.dll' Read of address 00000030.
The error occurs as above, substituting libgfl2.90 by libgfl3.11 without modifying the source code of the program.
I fixed the problem, as the previous case, stating gflbitmap in another unit of the program.
The problem I have is that I can not reproduce the error in a simple program so I can not analyze the causes of the error.
Miguel Angel
this time I'm having problems with gflLoadBitmap.
'Access violation at address 00984784 in module libgfl311.dll' Read of address 00000030.
The error occurs as above, substituting libgfl2.90 by libgfl3.11 without modifying the source code of the program.
I fixed the problem, as the previous case, stating gflbitmap in another unit of the program.
The problem I have is that I can not reproduce the error in a simple program so I can not analyze the causes of the error.
Miguel Angel
-
- Posts: 72
- Joined: Thu Nov 08, 2007 9:22 am
Re: Error in gflLoadBitmapFromMemory ?
Hello,
Have you tried to remove/comment "unsafe" code : for exemple newest code, special memory allocation/delete... This kind of error is difficult to fix.
Help yourself with your debugger.
I don't think Pierre could help you without more information.
Have you tried to remove/comment "unsafe" code : for exemple newest code, special memory allocation/delete... This kind of error is difficult to fix.
Help yourself with your debugger.
I don't think Pierre could help you without more information.
Dom