Alpha problem with text
BlitzMax Forums/BlitzMax Beginners Area/Alpha problem with text
| ||
I use a fade-method for fading two pictures. That works fine. The picture consists of a 24-bit png with alpha-mask (saved with photoshop) and some text which is placed at runtime by Bmax. The white part in the picture which was in the original .png file blends perfectly. But the white part of the text always stays more transparent. Check the pictures: You can see the "0" has some strange grey in the white part, while the white outline of the blue part is correctly blended. (anyone knows how I can include pictures here?) This is how the final picture looks. The outline of the text is also white. But why is it not blended correctly like the white part of the blue at the bottom? |
| ||
I think I found the cause, but not the solution: The loaded PNG has an alpha-channel. When I put some text on it at runtime, the text doesn't change the alpha-channel at that position, i.e. that spot is still "transparent" in the alpha-channel. So what I need is a way to take an image and modify it's alpha-channel at runtime so it's solid without transparency. Is there a function to modify the alpha or draw to the alpha of an image? |
| ||
Howabout: SetBlend SOLIDBLEND DrawImage ... (without transparancy) SetBlend ALPHABLEND (switch alpha blending back on) |
| ||
That doesn't apply, since it's a fade-two-screens-method which has to use Alphablend. I need to set the alpha-channel of the pic to non-transparent. |