Displaying A Transparent PNG on a MaxGUI Window
BlitzMax Forums/BlitzMax Programming/Displaying A Transparent PNG on a MaxGUI Window
| ||
Hi, I have a window with a panel on it which I used to display an image. The image is a PNG and has transparent parts to it in an image editor, but when I load it using LoadPixmapPNG and apply it to the MaxGUI panel (using SetPanelPixmap), the background colour of the image remains white (e.g. not transparent). I have tried using the MaskPixmap() function and applying that to the panel but you get a black background instead. What I need ideally is for the transparent parts of the PNG (the background) to be the window's background colour? Is this possible and if so, how do you do it? :P Cheers Seb |
| ||
Hello! I currently (still) have the same problem: I'm loading a (fully opaque) PNG file and try to apply maskPixmap in order to make certain areas of my pixmap (fully) transparent - the term "fully" shall indicate, that I am *not* talking about alpha channel right now! When using the resulting pixmap as argument to "setPanelPixmap", the affected panel shows an image with a black background rather than letting the original color shine through... Is there any other (better) way to achieve the transparency effect? |
| ||
see-thru is what you need. :) http://www.blitzbasic.com/Community/posts.php?topic=66165 |
| ||
James, thanks for the quick response, but...is it really that complicated? If it's really necessary to add some C++ code just to allow for bitmap images to have transparent regions under Win32 (which Java already offered in its alpha version in 1995) it's probably a good idea to issue a bug report... I can't imagine any MaxGUI application with tool bars etc. which would not need bitmap transparency (again, I'm not talking about full blown alpha channels here) |