• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Problem with LoadMultiFromFile

Started by danthorpe, 3 August 2007, 16:06:06

Previous topic - Next topic

danthorpe

Hi there !

I´m a programmer here in Brazil, and I´m using Vampyre under Linux, with Lazarus. And I´m having some problems with it, since I can´t load any images with the function :

var
  FImage : ImagingClasses.TMultiImage;

...

FImage := TMultiImage.Create;
FImage.LoadMultiFromFile('/root/Test/bank.png');


I always get an acess violation at this point, with the following output :

TApplication.HandleException Access violation
Stack trace:
$4008BB6E  TTEXTUREFILEFORMAT__TESTFORMAT,  line 220 of gtkglobals.pp
$08208389  GDKDRAWBITMAP,  line 825 of /usr/lib/lazarus/components/imaginglib0240/Imaging/Source/ImagingComponents.pas
$082082CF  DISPLAYIMAGEDATA,  line 872 of /usr/lib/lazarus/components/imaginglib0240/Imaging/Source/ImagingComponents.pas
$0820849B  DISPLAYIMAGE,  line 890 of /usr/lib/lazarus/components/imaginglib0240/Imaging/Source/ImagingComponents.pas
$08079268  PINTAR,  line 63 of unit1.pas
$08079323  ASSIGNMENTS,  line 92 of unit1.pas
$080793AD  TFORM1__BUTTON1CLICK,  line 117 of unit1.pas
$08112906  TCONTROL__CLICK,  line 1971 of ./include/control.inc
$0816AC0D  TBUTTONCONTROL__CLICK,  line 57 of ./include/buttoncontrol.inc
$0816C611  TCUSTOMBUTTON__CLICK,  line 184 of ./include/buttons.inc
$0816CA1D  TBUTTON__CLICK,  line 304 of ./include/buttons.inc
$0816C591  TCUSTOMBUTTON__EXECUTEDEFAULTACTION,  line 159 of ./include/buttons.inc
$08077942  TAPPLICATION__DORETURNKEY,  line 1514 of ./include/application.inc
$08077266  TAPPLICATION__CONTROLKEYUP,  line 1307 of ./include/application.inc
$0810A7EE  TWINCONTROL__CONTROLKEYUP,  line 4057 of ./include/wincontrol.inc
$0816C359  TCUSTOMBUTTON__CONTROLKEYUP,  line 63 of ./include/buttons.inc
$0810A526  TWINCONTROL__DOREMAININGKEYUP,  line 3957 of ./include/wincontrol.inc


Can anyone help me ? I´m in a big hurry with this project

One more thing, the call to the function works perfectly on WinXP. I´m using SuSe 10, and Lazarus 0.9.22

Thanks in advance

Galfar

Could you please send me that image so I could test it?

Stack trace says it fails in TTextureFileFormat.TestFormat so you can disable
this file format and see if it helps. You can do it by commenting out
line with {$DEFINE LINK_ELDER}
in Imaging\Extras\Extensions\ImagingExtras.pas unit.

danthorpe

I could, by after some more tests, I noticed it happens to every image, and every image type (jpeg, gif, png ...). Also, I noticed that if I use

var
  ImgData: TImageData;

InitImage(ImgData);
LoadImageFromFile('C:\Documents and Settings\temp\Meus documentos\Delphi\Teste GIF\10.jpg', ImgData);


instead, it loads the image, but I don´t know how to display it.

Galfar

So it is crashing only in Suse and Windows work ok?
I'll install Suse somewhere and try it. Works ok in Mandrake and Fedora though.

How do you want your image displayed? On VCL form or do you use OpenGL/DirectX/..?
If VCL is you case you can use DisplayImage or DisplayImageData functions or
TImagingGraphic class (Delphi's TBitmap descendant).



Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk