PNG alpha channel help
Blitz3D Forums/Blitz3D Programming/PNG alpha channel help
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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! |
| ||
Shifty. yes. but, it still wont work with DrawImage ;) |
| ||
Sorry, wasn't paying attention! |
| ||
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. |
| ||
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. |