Main Menu

displaying image with alpha channel

Started by westray, September 04, 2007, 02:42:58 PM

Previous topic - Next topic

westray

I have an image which I am using as a sprite.I made the image in Paintshop Pro with a transparent background and a drop shadow..The image was saved as a PNG file .My question is ,how can I show this image in Playbasic so that the shadow on the image shows up with the same transparency as when I made it in PSP.At the moment the image shows ok but the shadow part shows as pure black.

kevin

#1
  If load an Image into PB the Alpha Channel is removed by the image loader.   You can overcome this by using a different loader such as the FreeImage library.   You could also split and merge the playfields manually.  It's not rocket science.

See:   Alpha Channel Example


Note: However in modern versions of PB (V1.64 Flavors) you can load BMP/TGA & PNG as AFX.. Which is an FX surface that retains Alpha Channel.