[Lazarus] Create transparency

Valdas Jankūnas skroblas at erdves.lt
Mon Jul 21 17:46:22 CEST 2008

Marc Weustink rašė:

> A faster way, (which might work in most cases) is when you have a 24bit 
> depth description with a 32bits per pixel image. 

  How retrieve image description from TBitmap?

> Then you can simply add 
> an alpha description (precision=8, shift=24 or 0) to the rawimage.

  How i can do that?

> Another thing, I'm not sure if loading form IntfImage/RawImage sets the 
> right pixelformat (and thus image description).
> Anyway, maybe the bmp is OK. How do you paint it ?

  I use Canvas.Draw method.

  I found another solution to not use a proxy image, but load resource 
from stream directly to LazIntfImage (created with 
Init_BPP32_B8G8R8A8_BIO_TTB description). Now i always got alpha channel 
and code is flexible to various image types (need just change image 
reader type). I thing il stay with this solution.

  Thanks for help

   Valdas Jankūnas

More information about the Lazarus mailing list