Transparency - Color keying

Prev

Next

 






































































































Window transparency overview.

Description

Alphablending and color keying when the video window is detached from the control

When the video window is detached from the control (Display_Embedded = false), it is possible to superpose another video window and to apply semi transparency AND/OR color keying.

The semi transparency is enabled by Display_AlphaBlendEnabled, and the semi transparent value is specified by Display_AlphaBlendValue (in the 0..255 range)

The color keying is enabled by Display_TransparentColorEnabled, and the RGB color key value is specified by Display_TransparentColorValue


Transparency of another video window when the video window is embedded in the control

To use window transparency, simply enable the ColorKeyEnabled property, then invoke SetWindowTransparency to set the color key of your form (or window) to make it transparent when moved over the video window.
You have to pass to SetWindowTransparency the default TVideoGrabber ColorKey.
(you can customize the ColorKey value if needed)

Optionally the color key can be defined by the ColorKey property.

Look at the transparency checkbox code in the "display" tab of the MainDemo project for sample code.



See Also
TOnColorKeyChange ColorKeyEnabled OnColorKeyChange