Overlays a base image with an overlay image.
The opacity of the overlay image can be specified between 0.0 (invisible - see all the base image unchanged) to 1.0 (opaque - see only the overlay image). The overlay image can be a different size from the base image. The base image size determines the final image size.
The overlay image can be offset. By default the top left corner of both images are aligned.
The base frame content determines the output frame format. If the base image is RGB32 then all computations are done in RGB32, if the base image is YCrCb then all the computations are done in YCrCb.
The mask is optional. If it is supplied it will be converted (if necessary) to the same format as the base image.
The mask will modify the opacity on a pixel-by-pixel basis. In RGB32 format this is done by summing the red, green and blue values and dividing by 255*3 to get a float value, which is multiplied by the opacity. In YCrCb the luminace value is divided by 255 to get a float value which is multiplied by the opacity. Use of grey-scale images is recommended. If using opacity = 1.0, then where the mask is black, the base image will be seen unchanged. Where the mask is white the overlay image will be seen unchanged. The grey areas will show a mix of both the base and overlay images.
Note that the mask may also be a dynamic image.
The mask may also be a different size from the base image, and may be offset with its own offset values.