Trying to load a masked image
BlitzMax Forums/BlitzMax Beginners Area/Trying to load a masked image
| ||
Couple more questions. I see that PNG's are supported now. Does this mean they keep their Alpha channel information? Secondly, if I am loading a BMP or JPG which I have a mask color, how do I load it with that mask color. This is what I am trying: setmaskcolor(255,0,255) n.img% = LoadImage(tempimage$,flags=MASKEDIMAGE) It's giving me a flag error. Do I not have to set the flags for the loadimage? |
| ||
try setmaskcolor(255,0,255) n.img% = LoadImage(tempimage$,MASKEDIMAGE) |
| ||
Couple more questions. I see that PNG's are supported now. Does this mean they keep their Alpha channel information? Yes. |
| ||
PNG's do keep their alpha, as long as you saved them with their alpha channel information (as not all packages do by default), but to make use of it you need to set the blend mode to alphablend before drawing them (SetBlend ALPHABLEND). |