1) Standard 24-bit BITMAP images do not support transparency... so
converting any 32-bit transparent image (including TGA) to a 24-bit
BITMAP would lose the transparency.
2) As the documentation states, always use "Render_Transparent" to
render images unless you have special needs for your rendering
that "Render_Transparent" doesn't support and another render function
does (i.e. - if you need to stretch your picture when you render
it, "Render_Normal" supports this, but "Render_Transparent" does not).
3) I would suggest loading the 32-bit transparent TGA file, and then
use the "Render_Transparent" function to render the image
transparently onto your PictureBox.
If you're using VB5 or VB6, set the PictureBox's "AutoRedraw"
property to TRUE.
If you're using VB.NET, C#.NET, or any other .NET language... the
PictureBox no longer has an "AutoRedraw" property... so when the
PictureBox is refreshed or redrawn, some or all of your rendered
image will be lost. If you're doing animation (rendering multiple
images onto a PictureBox quickly), this is not an issue. If you're
NOT doing animation, I might suggest storing the image handle and
then kicking off a call to the "Render_Transparent" function every
time the "Paint" event is called.
If you're using .NET, an alternative to this is converting the image
to a transparent PNG image and then setting the "Image" property of
the PictureBox to that PNG image. .NET PictureBoxes support
transparent PNG images.
Hope this helps.
- Kevin
--- In AIL_Development@yahoogroups.com, "bluescreenweasel"
<peteraddington@...> wrote:
>
> Hello all AIL users.
>
> I wanted to know what the quickest way would be to load a 32 bit tga
> so that the alpha transparency was preserved. Ideally i'd need my
> fuction to return a bitmap so that i can update a picturebox. There
> are a few methods pertaining to the use of alpha channels and
> transparency, but i am unsure of what one to use. I just need the
> fastest way of displaying the image. many thanks
>