png mask help!
BlitzPlus Forums/BlitzPlus Programming/png mask help!
| ||
How do I mask alpha channel? on a png image. |
| ||
Load the image and then use MaskImage(Image,0,0,0)? |
| ||
did't work! |
| ||
BlitzPlus (and Blitz3D) doesn't support PNG alpha in its 2D engine. It only supports masking on a selected RGB colour (which is what Grisu suggests, masking out 0,0,0). If you want you can use bOGL with the Draw2D addon to get a more powerful 2D engine that supports alpha blending. Otherwise you'll probably have to use something other than BlitzPlus. |
| ||
Just reinstalled BP. The easiest way is you set your own transparency color. Most people use "pink" (rgb:255,0,255) Tested it. Works fine. image = LoadImage ("monkey_24px.png") MaskImage (image, 255,0,255) Here's another example: http://www.blitzbasic.com/bpdocs/command.php?name=MaskImage&ref=2d_cat |
| ||
Is there any userlib that do it? |
| ||
Not that I know of. I used to "convert" each image by hand to the same "alpha mask". It's not that hard, you wouldn't need a userlib for this. |
| ||
Is there any userlib that do it? There used to be -- many years ago I came across a DLL that could add support for alphablended graphics in blitzplus at a reasonable speed, but for the life of me I don't remember the name, and haven't seen anything about it in a LONG time. |