Transparent PNG Files ?

Blitz3D Forums/Blitz3D Beginners Area/Transparent PNG Files ?

StOrM3(Posted 2004) [#1]
Hello,
Question.. I am working on converting some items in my game to 2D Sprite representations, since it is a puzzle game which does not move in the 3rd dimension or Y anyways. What I need to know is, I am going to be doing screen captures, and cutting the images to 64x64 either PNG or TGA files, and I need to know how to make the background portion of the images transparent, is there a special color that Blitz3D uses, is it black 0,0,0 or magic pink 255,255,0 or what ?

Can someone please help me on this, also if it helps I will be using nSprite to do the display of the 2D images, if that info helps at all. Thanks..


Ross C(Posted 2004) [#2]
You could copy whatever you need into an image.

Then set the images mask colour:

MaskImage image,RED,GREEN,BLUE

That should work.


eBusiness(Posted 2004) [#3]
I would probably be easiest to use the alpha channel of one of the mentioned formats.


Rook Zimbabwe(Posted 2004) [#4]
I have a problem using the Alpha Chan for Trans... sometimes (and I have no idea why) it looks grey. I use PSP8 to do the conversion.

Athlon 64 3200 1024 ATI9000


eBusiness(Posted 2004) [#5]
Do you remember to load the texture with alpha channel? Check the docs, if you do, remember to enable the colour flag also.