Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

TImage wrong image format

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I think I found a bug after following the next steps:

1) Place a TImage on a newly created form.
2) Click on "..." on Object Inspector -> Picture and load an image (I tested with jpeg, png, png all with the same results).
3) Go to the form, and you'll see the image.
4) Right click on the form and select View Source (.lfm), here you can see the object Image1 and its Picture.Data containing the image info.
5) Close the .lfm tab
6) Press F12 to see the form again and you'll get this error:

"Stream=TForm1:Root=:TForm1
Component Class: TImage
Error reading Image1.Picture.Data: Wrong imagre format Stream position: 28777"

I'm using:

Free Pascal Compiler version 2.5.1 [2010/11/24] for x86_64 - Linux Lazarus 0.9.29 - Rev 28470 - x86_64-linux-gtk 2

Reply by email

Leonardo M. Ramé
to Leonardo M. Ramé
Leonardo M. Ram? wrote 21 lines
Hi, I think I found a bug after following the next steps: 1) Place a TImage on a newly created form. 2) Click on "..." on Object Inspector -> Picture and load an image (I tested with jpeg, png, png all with the same results). 3) Go to the form, and you'll see the image. 4) Right click on the form and select View Source (.lfm), here you can see the object Image1 and its Picture.Data containing the image info. 5) Close the .lfm tab 6) Press F12 to see the form again and you'll get this error: "Stream=TForm1:Root=:TForm1 Component Class: TImage Error reading Image1.Picture.Data: Wrong imagre format Stream position: 28777" I'm using: Free Pascal Compiler version 2.5.1 [2010/11/24] for x86_64 - Linux Lazarus 0.9.29 - Rev 28470 - x86_64-linux-gtk 2 --

Udated FPC & Lazarus and the bug seems to be fixed.

Thanks!

Reply by email

Leonardo M. Ramé
to Leonardo M. Ramé
Leonardo M. Ram? wrote 27 lines
On 2010-11-26 09:39:30 -0300, Leonardo M. Ram? wrote: > Hi, I think I found a bug after following the next steps: > > 1) Place a TImage on a newly created form. > 2) Click on "..." on Object Inspector -> Picture and load an image (I > tested with jpeg, png, png all with the same results). > 3) Go to the form, and you'll see the image. > 4) Right click on the form and select View Source (.lfm), here you can > see the object Image1 and its Picture.Data containing the image info. > 5) Close the .lfm tab > 6) Press F12 to see the form again and you'll get this error: > > "Stream=TForm1:Root=:TForm1 > Component Class: TImage > Error reading Image1.Picture.Data: Wrong imagre format > Stream position: 28777" > > I'm using: > > Free Pascal Compiler version 2.5.1 [2010/11/24] for x86_64 - Linux > Lazarus 0.9.29 - Rev 28470 - x86_64-linux-gtk 2 > -- Udated FPC & Lazarus and the bug seems to be fixed. Thanks!

Well, the "Wrong image format" error is fixed, but I found a new one.

When a TImage is created at Design-Time, with an image assigned to its Picture property, the image is not :

1) Place a TImage on a new form.
2) Object Inspector -> Picture -> Click on "..." to load an image.
3) Load an image
4) You can see the image loaded on the TImage.
5) Run the app. The TImage doesn shows its picture.

Lazarus 0.9.29 rev 28500 - Linux x86_64
FPC rev 16446 - Linux x86_64
Ubuntu 10.04 - 64bits

Reply by email

Mattias Gaertner
to Leonardo M. Ramé
Show quoted text 45 lines
On 2010-11-26 10:55:58 -0300, Leonardo M. Ram? wrote: > On 2010-11-26 09:39:30 -0300, Leonardo M. Ram? wrote: > > Hi, I think I found a bug after following the next steps: > > > > 1) Place a TImage on a newly created form. > > 2) Click on "..." on Object Inspector -> Picture and load an image (I > > tested with jpeg, png, png all with the same results). > > 3) Go to the form, and you'll see the image. > > 4) Right click on the form and select View Source (.lfm), here you can > > see the object Image1 and its Picture.Data containing the image info. > > 5) Close the .lfm tab > > 6) Press F12 to see the form again and you'll get this error: > > > > "Stream=TForm1:Root=:TForm1 > > Component Class: TImage > > Error reading Image1.Picture.Data: Wrong imagre format > > Stream position: 28777" > > > > I'm using: > > > > Free Pascal Compiler version 2.5.1 [2010/11/24] for x86_64 - Linux > > Lazarus 0.9.29 - Rev 28470 - x86_64-linux-gtk 2 > > -- > > Udated FPC & Lazarus and the bug seems to be fixed. > > Thanks! > Well, the "Wrong image format" error is fixed, but I found a new one. When a TImage is created at Design-Time, with an image assigned to its Picture property, the image is not shown at run-time. Example: 1) Place a TImage on a new form. 2) Object Inspector -> Picture -> Click on "..." to load an image. 3) Load an image 4) You can see the image loaded on the TImage. 5) Run the app. The TImage doesn shows its picture. Lazarus 0.9.29 rev 28500 - Linux x86_64 FPC rev 16446 - Linux x86_64 Ubuntu 10.04 - 64bits

It works here:

Lazarus 0.9.29 rev 28500 - Linux x86_64
FPC 2.4.2 - Linux x86_64
Ubuntu 10.10 - 64bits

Can you provide an example image where it does not work?

Mattias

Reply by email

Leonardo M. Ramé
to Mattias Gaertner
Mattias Gaertner wrote 59 lines
On Fri, 26 Nov 2010 11:23:01 -0300 Leonardo M. Ram? wrote: > On 2010-11-26 10:55:58 -0300, Leonardo M. Ram? wrote: > > On 2010-11-26 09:39:30 -0300, Leonardo M. Ram? wrote: > > > Hi, I think I found a bug after following the next steps: > > > > > > 1) Place a TImage on a newly created form. > > > 2) Click on "..." on Object Inspector -> Picture and load an image (I > > > tested with jpeg, png, png all with the same results). > > > 3) Go to the form, and you'll see the image. > > > 4) Right click on the form and select View Source (.lfm), here you can > > > see the object Image1 and its Picture.Data containing the image info. > > > 5) Close the .lfm tab > > > 6) Press F12 to see the form again and you'll get this error: > > > > > > "Stream=TForm1:Root=:TForm1 > > > Component Class: TImage > > > Error reading Image1.Picture.Data: Wrong imagre format > > > Stream position: 28777" > > > > > > I'm using: > > > > > > Free Pascal Compiler version 2.5.1 [2010/11/24] for x86_64 - Linux > > > Lazarus 0.9.29 - Rev 28470 - x86_64-linux-gtk 2 > > > -- > > > > Udated FPC & Lazarus and the bug seems to be fixed. > > > > Thanks! > > > > Well, the "Wrong image format" error is fixed, but I found a new one. > > When a TImage is created at Design-Time, with an image assigned to its > Picture property, the image is not shown at run-time. > > Example: > > 1) Place a TImage on a new form. > 2) Object Inspector -> Picture -> Click on "..." to load an image. > 3) Load an image > 4) You can see the image loaded on the TImage. > 5) Run the app. The TImage doesn shows its picture. > > Lazarus 0.9.29 rev 28500 - Linux x86_64 > FPC rev 16446 - Linux x86_64 > Ubuntu 10.04 - 64bits It works here: Lazarus 0.9.29 rev 28500 - Linux x86_64 FPC 2.4.2 - Linux x86_64 Ubuntu 10.10 - 64bits Can you provide an example image where it does not work? Mattias

There it is.

Leonardo M. Ram? http://leonardorame.blogspot.com -------------- next part -------------- A non-text attachment was scrubbed... Name: timage-error.tar.bz2 Type: application/octet-stream Size: 29513 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101126/935e32e5/attachment-0001.obj>

Reply by email