View Full Version : GDI alpha blend

December 31, 2004, 09:26:29
The GDI filter isn't behaving in a way I'd expect. I might be using it wrong.

I am using an MPEG1 file as an input, and drawing text over the image using standard DrawText API functions. I have set the filter to constant alpha mode. When I adjust the alpha value it affects the entire video image. That is, 255 is "full brightness" and 0 is completely dark.

To keep things simple I have set the text in white with a black background. (In transparent mode, with the transparency color also set to black, the text has a transparent background. This is working as expected.)

My expectation is that setting the alpha value changes the alpha blend of the text over the video. The effect would be that of the text "fading" in or out, not fading the entire image.

Is the GDI filter working as designed, and/or is there another setting that can be made for it to behave in the manner I've outlined?

Marc Cymontkowski
January 4, 2005, 08:55:50
Hi Gordon,

you are doing everything right, that is the way the filter works for now. The fading you are trying to achieve would require another working mode of the filter. The main concern is the performance of such an operation. We will discuss if we will implement this additional feature.

Thanks for pointing this out!

Best Regards,

Marc Cymontkowski

January 4, 2005, 23:39:54
Thanks for considering the enhancement.

The blend would be handy when only a "watermark" of the overlay image is needed. For my particular application I need to simulate, as much as possible, the appearance of certain video subtitling effects, and alpha blending with varying amounts of transparency is becoming fairly common.