Sign in Join

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

Mailing lists / lazarus / 2008-04

Help drawing a transparent bitmap through a image list

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Luiz Americo Pereira Camara

I'm trying to draw a bitmap (bmp file) transparent through a image list.

The bitmap has a white area that i want to be transparent.

I tried several combinations of Masked, BkColor, DrawingStyle properties, as well setting the masked color in image list editor without luck.

I'm using v0.9.25 r14561M i386-win32-win32/win64 under winXP SP2

I attached a test project that comes also with the bitmap file.

Any help is appreciated.

Luiz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageListTransparent.zip
Type: application/x-zip-compressed
Size: 15302 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080412/fa353b47/attachment.bin

Reply by email

wile64
to Luiz Americo Pereira Camara

2008/4/12, Luiz Americo Pereira Camara :

Show quoted text 13 lines
I'm trying to draw a bitmap (bmp file) transparent through a image list. The bitmap has a white area that i want to be transparent. I tried several combinations of Masked, BkColor, DrawingStyle properties, as well setting the masked color in image list editor without luck. I'm using v0.9.25 r14561M i386-win32-win32/win64 under winXP SP2 I attached a test project that comes also with the bitmap file. Any help is appreciated.

I just opened your image with Gimp and save for this to work. Your image is 2 bytes more, I suppose that the format is not well recognized by the reader FPC

regards,

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080412/089ff7c3/attachment-0001.html

Reply by email

Luiz Americo Pereira Camara
to wile64
wile64 wrote
I just opened your image with Gimp and save for this to work. Your image is 2 bytes more, I suppose that the format is not well recognized by the reader FPC

Thanks, i opened the file in GIMP, saved back and really the new file is two bytes smaller. But i still could not get to work.

What are the values of Masked, BkColor, DrawingStyle properties that you used?

Are you using windows?

Luiz

Reply by email

Luiz Americo Pereira Camara
to Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote 6 lines
wile64 wrote: > I just opened your image with Gimp and save for this to work. > Your image is 2 bytes more, I suppose that the format is not well > recognized by the reader FPC >

In a second look, loading both files with TBitmap.LoadFromFile and setting Transparent to true, both will work properly. So it seems is not a error in loading procedure.

It seems like a bug in TImageList code. I'll wait for some feedback before sending the bug report.

Luiz

Show quoted text 17 lines
Thanks, i opened the file in GIMP, saved back and really the new file is two bytes smaller. But i still could not get to work. What are the values of Masked, BkColor, DrawingStyle properties that you used? Are you using windows? Luiz _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

wile64
to Luiz Americo Pereira Camara: Thanks, i opened the file in GIMP, saved back and really the new file is two bytes…

2008/4/13, Luiz Americo Pereira Camara :

Show quoted text 13 lines
wile64 wrote: > > I just opened your image with Gimp and save for this to work. > Your image is 2 bytes more, I suppose that the format is not well > recognized by the reader FPC Thanks, i opened the file in GIMP, saved back and really the new file is two bytes smaller. But i still could not get to work. What are the values of Masked, BkColor, DrawingStyle properties that you used?

Nothing, just replace the image in your example.

Are you using windows?

No, Ubuntu GTK2
I test under windows in 1 hour :)

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080413/60aa1118/attachment.html

Reply by email

wile64
to wile64

2008/4/13, wile64 :

Show quoted text 28 lines
2008/4/13, Luiz Americo Pereira Camara : > > wile64 wrote: > > > > I just opened your image with Gimp and save for this to work. > > Your image is 2 bytes more, I suppose that the format is not well > > recognized by the reader FPC > > > Thanks, i opened the file in GIMP, saved back and really the new file is > two bytes smaller. But i still could not get to work. > > What are the values of Masked, BkColor, DrawingStyle properties that you > used? Nothing, just replace the image in your example. Are you using windows? > No, Ubuntu GTK2 I test under windows in 1 hour :)

It's good on winXP SP2 with v0.9.25 r14814 i386-win32-win32/win64 and GTK2

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080413/c1fa80f7/attachment.html

Reply by email

Luiz Americo Pereira Camara
to wile64: 2008/4/13, Luiz Americo Pereira Camara : Nothing, just replace the image in your example.…
wile64 wrote 29 lines
2008/4/13, Luiz Americo Pereira Camara < <mailto:>>: wile64 wrote: > > I just opened your image with Gimp and save for this to work. > Your image is 2 bytes more, I suppose that the format is not well > recognized by the reader FPC Thanks, i opened the file in GIMP, saved back and really the new file is two bytes smaller. But i still could not get to work. What are the values of Masked, BkColor, DrawingStyle properties that you used? Nothing, just replace the image in your example. Are you using windows? No, Ubuntu GTK2 I test under windows in 1 hour :)

Definitely a bug, if the image list is built using a win32 ide the transparency will not work but if is built with a gtk ide will work in both widget sets.

See bug 11150

Luiz

Reply by email