[lazarus] TImage not displaying image?
Tony Maro
tonym at nlisc.com
Wed Sep 4 15:46:12 EDT 2002
Okay, I grabbed the CVS just now and rebuilt. The editor is there and
it displays fine during editing. Now, I launch my program with the
TImage on the form and have a button to load from file and as soon as it
does, it crashes.
Here's the code:
image1.picture.loadfromfile('/home/tonym/rdphead.bmp');
The bitmap was originally true color. After that crashed I reduced it
to 128 colors indexed and RGB both to no avail. Here's what happens in
the console window when the app is run and this line is called:
Form Stream "TFORM1" Signature=TPF0
TPicture.LoadFromFile A TBITMAP
TPicture.LoadFromFile B TBITMAP
TPicture.LoadFromFile C
TPicture.LoadFromFile D
TPicture.LoadFromFile E
TPicture.LoadFromFile F
An unhandled exception occurred at 0x080E7BE9 :
Access violation
0x080E7BE9 main, line 12 of extctrls.pp
0x080DB3CB
0xBFFFE50C main, line 14 of gtkint.ppgtkproc.inc
An unhandled exception occurred at 0x080D504A :
Access violation
0x080D504A
forms.pp - finalization section
[TgtkObject.Destroy] WARNING: There are 9 unreleased GDIObjects, a
detailed dump follows:
[TgtkObject.Destroy] GDIOs: 08110904 08110894 08110844 081107D4
08110764 081106F4 08110684
[TgtkObject.Destroy] gdiBrush: 6
[TgtkObject.Destroy] gdiPen: 3
I know everything's not finished yet with lazarus (and probably never
will be :-) so I apologize if I'm asking a stoopid question about a
feature that just doesn't work yet, but Andrew stated I should be able
to load the image at runtime... Transparency and Autosize are both
turned off.
On Wed, 2002-09-04 at 15:03, Andrew Johnson wrote:
> >there's no ellipsis button
> If you don't have this button, your Lazarus is older than yesterday, because
> the property editor wasn't added until yesterday morning, along with the
> fixes which make TImage work.
>
> Even so, please note that changing the image in Lazarus will not change it
> in the program yet, as TBitmap/TPixmap cannot save to streams yet. However,
> after updating your lazarus from CVS, you should be able to load the image
> at runtime. Though there are problems with Transparency and AutoSize not
> always working yet. I am still tryig to figure out why..
>
> Andrew
>
> _________________________________________________________________
> Join the worlds largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
More information about the Lazarus
mailing list