|
Post by Wayne Rayner on Mar 17, 2010 18:52:27 GMT -5
I have been trying to load image including transparency but it does all kinds of weird things. there are two images in the zip folder. One is a screenshot of what basic4Gl does to the image bar.gif also the code I have is here. dim tex (1) dim bar, tower1
tex (0) = LoadTex ("Resources/graphics/bar.gif")
bar = NewSprite (tex (0)) SprSetPos (600,300) SprSetSize (200,600) SetTexTransparentCol(255, 0, 255) bindSprite (bar) your help would be gratefull Attachments:
|
|
|
Post by matthew on Mar 17, 2010 21:33:33 GMT -5
Well for a start the image that is supposed to be a GIF is in the PSD format & it's the incorrect size.
The width & height of your image have to be in a Power of Two.
So sizes such as 1, 2, 4, 8, 16, 32, 64, 128 etc are acceptable. Sizes like 200 x 600 aren't.
|
|
|
Post by matthew on Mar 17, 2010 21:49:06 GMT -5
Okay, I've solved the problem. I changed the image from a PSD to a PNG file & then resized it to 128 x 512 pixels. I also changed your program so SetTexTransparentCol gets called before the sprite is loaded. Attachments:
|
|