Page 1 of 1
png transparency not working?
Posted: Sat Apr 14, 2007 17:46
by jed
Hi I'm loading an imageset that uses a png file. I'm using it as a sprite essentially so I don't want it drawn as a simple square. The png has transparency turned on. the png shows up with the correct transparency in photoshop.
I call Image::draw()
the image appears but rather than the area marked transparent being see through it is white. Do I need to do something other than call Image::draw to get it to work correctly?
Posted: Tue Apr 17, 2007 17:26
by jed
Transparency doesn't seem to work with gifs either.
Here is a simple example:
Code: Select all
CEGUI::Imageset* unitImages=CEGUI::ImagesetManager::getSingleton().createImageset("units.imageset");
MouseCursor::getSingleton().setImage("units","cursor");
The cursor becomes a white block with the image. Do I need to call something else?
Posted: Wed Apr 18, 2007 14:36
by Pompei2
Strange, as for me it seems to work (drawing transparent png's). You could try to display that image in a StaticImage to see if it's CEGUI having problem with your image or your drawing code having problems.
Posted: Wed Apr 18, 2007 14:47
by Levia
There are more people having the problem that their images are showing up white. Wonder what it is.
Posted: Wed Apr 18, 2007 15:37
by jed
StaticImage doesn't work either. The png is definitely transparent, it works fine in a webpage. Do you think it needs a specific bit depth of png? Could someone send me a png that works for them?
Also I just tried it as a .tga and it works fine.
Posted: Thu Apr 19, 2007 21:41
by Pompei2
Ok, it's sure that it is the png file.
This picture works for me.
PNG and Transparent
Posted: Tue May 29, 2007 03:32
by MattyBoy
I have the same problem. Does anyone have any ideas?? I have also tried the suggestion from this thread.
[url]http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1814&highlight=png+transparent
[/url]
Posted: Tue May 29, 2007 11:16
by Pompei2
Witch renderer do you use ? Witch image loader library do you use ?
Do you also have the same problem with the TaharezLook.tga file ?
Posted: Wed May 30, 2007 07:16
by MattyBoy
Ogre Renderer - Found out it just uses Built in D3D file loading. The problem was something else un-related. Thanks.