PNG alpha channel help

Blitz3D Forums/Blitz3D Programming/PNG alpha channel help

Qube(Posted 2005) [#1]
I know this has come up many times before, but for the life of me I can't find any info on it.

Say I have a simple filled circle image, using a drop shadow in photoshop. I save the image as PNG.

How do I place these images in Blitz3D next to each other retaining the alpha channel?

Lol, it's doing my head in. I know I'm missing something really simple here.


jfk EO-11110(Posted 2005) [#2]
On the Photoshop side you probably need to create an additional Layer. after R,G and B this will be Alpha by default. If you save it now, I guess it will save the PNG (if memory serves :) ).

On the blitz side note images cannot use transparency info. all they can utilize is a mask color. It's black by default, but it may be altered to use an other color (MaskImage, IIRC)

Alpha Channels can only be used by textures. You may use a system that positions Sprites or Quads side by side to get the effect of images that are supporting smooth alpha transparency.


Qube(Posted 2005) [#3]
Thanks :)

Damnit!!! I thought there was a technique which allowed PNG images to use their alpha channel via drawimage?. Ah well, not to worry, I'll just have to tone down certain areas.


Shifty Geezer(Posted 2005) [#4]
All depends on the software. In PSP you can save the png and (being sure to save as True Colour, not 256 colour) choose "Transparency : use current transparency". No need to setup an alpha channel - WYSIWYG!


Damien Sturdy(Posted 2005) [#5]
Shifty. yes. but, it still wont work with DrawImage ;)


Shifty Geezer(Posted 2005) [#6]
Sorry, wasn't paying attention!


IPete2(Posted 2005) [#7]
er...

you could load them as sprites or textures though (for a quad for example) and use the flags set to 3 to keep alpha info.

It would be one image not two separate images though.

This would work - try it :

www.smartscreenuk.com/circle.png

(although this is a none filled circle).

IPete2.


Qube(Posted 2005) [#8]
Well textures are out because some of the people who'll be using the proggy are still using voodoo III's and I remember correctly those cards don't support above 256kb textures.

My best bet is to skip using any fancy shading and alpha windows for this project.