Creates a logical combination of two images. The pixels of each are combined one by one to form the output, using the color and alpha values of each to determine the final color on the output image. The way in which these colors and alpha values are combined depends on the value of the Function property.
For example, if the value of Function is 4 (DXCOMPFUNC_A_OVER_B), the first image will be rendered on top of the second image, and the second image will show through any regions of the first image that are transparent.
Note To use this transform, you need to have Microsoft® DirectX® Media 6, Microsoft Internet Explorer 5, the Microsoft Windows® 98 OEM Service Release (OSR), or Windows 2000 installed.
Transform Specifications
The following table contains the information you need to use this transform in script.
Globally unique identifier (GUID) | 9A43A844-0831-11D1-817F-0000F87557DB |
---|---|
Programmatic identifier (ProgId) | DXImageTransform.Microsoft.Compositor |
Inputs | Two input images are required. |
Transform type | Filter. |
Transform Properties
The following table lists the transform properties that control the appearance of the output.
Property name | Default | Description |
---|---|---|
Function | 4 (DXCOMPFUNC_A_OVER_B) | The compositing operation to perform. See Remarks for supported operations. |
Remarks
The Function property can equal any of the following possible values.
Value Operation Description 0 DXCOMPFUNC_CLEAR Performs no operation on the output. 1 DXCOMPFUNC_MIN Compares the brightness of each sample in both images, and shows only the less bright of the two samples. 2 DXCOMPFUNC_MAX Compares the brightness of each sample in both images, and shows only the brighter of the two samples. 3 DXCOMPFUNC_A Writes image A to the output. 4 DXCOMPFUNC_A_OVER_B Places image A over image B. All of image A will be visible, and image B will show through any regions of image A with zero alpha. 5 DXCOMPFUNC_A_IN_B Shows all parts of image A that are contained in image B for the resulting image. Only regions with nonzero alpha for both images will be visible, and no part of image B will show through. 6 DXCOMPFUNC_A_OUT_B Removes all parts of image B that are contained in image A for the resulting image. Areas in image B with zero alpha are not cut out of image A. 7 DXCOMPFUNC_A_ATOP_B Places image A over image B, with each sample scaled by the alpha channel of image B. 8 DXCOMPFUNC_A_SUBTRACT_B Subtracts the sample color values of image B from the corresponding sample color values of image A. Scales the resulting color by the alpha values of image A. 9 DXCOMPFUNC_A_ADD_B Adds the sample color values of image B to the corresponding sample color values of image A. Scales the resulting color value by the alpha value of image A. 10 DXCOMPFUNC_A_XOR_B For the resulting image, regions where the two images do not overlap show as normal. Regions that do overlap are scaled by their inverse value for alpha. 19 DXCOMPFUNC_B Writes image B to the output. 20 DXCOMPFUNC_B_OVER_A The same operation as DXCOMPFUNC_A_OVER_B, with images A and B switched. 21 DXCOMPFUNC_B_IN_A The same operation as DXCOMPFUNC_A_IN_B, with images A and B switched. 22 DXCOMPFUNC_B_OUT_A The same operation as DXCOMPFUNC_A_OUT_B, with images A and B switched. 23 DXCOMPFUNC_B_ATOP_A The same operation as DXCOMPFUNC_A_ATOP_B, with images A and B switched. 24 DXCOMPFUNC_B_SUBTRACT_A The same operation as DXCOMPFUNC_A_SUBTRACT_B, with images A and B switched. 25 DXCOMPFUNC_B_ADD_A The same operation as DXCOMPFUNC_A_ATOP_B, with images A and B switched.