Key Transition

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

[Deprecated. This API may be removed from future releases of Windows.]

 

The Key transition performs keying based on RGB value, alpha value, hue or luminance.

The following image shows the key transition:

key transition

Class ID (CLSID): {C5B19592-145E-11D3-9F04-006008039E37}

CLSID Variable Name: CLSID_DxtKey

Friendly Name: "DxtKey"

Properties

Property Type Valid range Description Applies To
Hue int 0–360 The hue value on which to key. Hue
Invert BOOL FALSE or TRUE Boolean value indicating whether to invert the default operation of the key. If FALSE, pixels in the overlying image are made transparent in the default manner. If TRUE, the operation inverts. Chroma, Hue, Luminance, Nonred
KeyType int See Remarks Specifies the type of key. For more information, see Remarks. All
Luminance int 0–100 The luminance value on which to key. Luminance
RGB DWORD 0x0 – 0xFFFFFF The color on which to key. The value is a hexadecimal number with the format 0xRRGGBB, where RR is the red value, GG is the green value, and BB is the blue value. (Pure red, green, and blue are 0xFF0000, 0x00FF00, and 0x0000FF, respectively.) Chroma
Similarity int 0–100 The range of color data that becomes transparent. At higher values, a wider range of similar colors is transparent. Chroma, Nonred

 

Remarks

The type of key that is performed depends on the value of the KeyType property, which must be one of the following:

Value Enumeration Description
0 DXTKEY_RGB Chroma key (key by RGB value).
1 DXTKEY_NONRED Nonred key. (Makes blue and green areas transparent.)
2 DXTKEY_LUMINANCE Luminance key.
3 DXTKEY_ALPHA Key by alpha value.
4 DXTKEY_HUE Key by hue.

 

The key type defaults to DXTKEY_ALPHA.