Log in

View Full Version : 1 bit Alpha.... how to do?



Huehnerschaender
31-08-2004, 04:39 PM
Hello,

here is the problem:

I have a background and an image.

Image should be drawn transparent by transparentColor, but without the background shining through it. And in combination with this I need to draw it with Color-Value to make it shine brighter or darker....

If I use effectAdd, the background shines through.
If I use effectSrcAlpha the transparent pixels are also drawn.
If I combine (effectAdd or effectSrcAlpha) the same appears: transparent pixels are drawn, so that I get a black square aroung the image.

So how can I draw something with, let's say an 1-Bit-AlphaMask using TransparentColor? Is there a possibility to do it without painting a second black and white image containg Alpha?

Greetings,
Dirk

Huehnerschaender
31-08-2004, 05:27 PM
Got it... it was my fault... accidentally loaded the image in R5G6B5-format :oops:

LP
31-08-2004, 10:37 PM
There's related issue - PowerDraw3 had problems with TransparentColor - not always the transparent color you specify was actually considered transparent (due to conversions error). The new version of Asphyre uses "Tolerance" in addition to TransparentColor in order to assure that the image will still be transparent (antialiasing is also provided, so that if you specify Tolerance of 50% - colors that were only 25% different will be drawn at half of their opacity).

Huehnerschaender
01-09-2004, 09:51 AM
Wow, sounds good. So this way it would be easy to draw "gradient transparency".... Good for nice effects :P