The transparent blitting function is based on source pixel values. A pixel in the destination image buffer is not modified if the corresponding pixel in the source buffer is "transparent". The interpretation of the color values specified in ulValue1 and ulValue2 is dependent on the source image color format (fccSrcColorFormat in the SETUP_BLITTER structure) and the transparent blitting mode.
The following table describes the color and range specification:
┌──────────────────────────────┬──────────────────────────────┐ │FOURCC_LUT8 │The color value is specified │ │ │in the low 8 bits of the │ │ │parameter. │ ├──────────────────────────────┼──────────────────────────────┤ │FOURCC_Y888, FOURCC_Y2X2, │23:8 - Y, 15:8 - U, 7:8 - V │ │FOURCC_Y4X4, FOURCC_YUV9, │(bits 31:8 ignored) │ │FOURCC_Y644, FOURCC_Y422 │ │ ├──────────────────────────────┼──────────────────────────────┤ │FOURCC_R565, FOURCC_R555, │23:8 - R, 15:8 - G, 7:8 - B │ │FOURCC_R664, FOURCC_RGB3, │(bits 31:8 ignored). R, G, │ │FOURCC_BGR3, FOURCC_RGB4, │and B components are specified│ │FOURCC_BGR4 │with 8-bit significance │ │ │regardless of significance in │ │ │source data. │ └──────────────────────────────┴──────────────────────────────┘
Transparent blitting of other source image formats is not supported.
For range comparisons in RGB or YUV, the three components are compared independently against the minimum and maximum values specified by the ulValue1 and ulValue2 parameters, respectively. A value is considered to be within the specified range if it is greater to or equal to ulValue1 and less than or equal to ulValue2.
For DIVE_TBM_EXCLUDE_SOURCE_VALUE transparent blitting, the specified value in ulValue1 is assumed to be in the source color space as described above. For range comparisons, the values specified in ulValue1 and ulValue2 are assumed to be in the color space in which the range comparison is to be performed, either YUV or RGB.
With LUT8 source format, in DIVE_TBM_EXCLUDE_SOURCE_VALUE transparent blitting mode, the value is assumed to be the original LUT8 value. For other transparent blitting modes (RGB or YUV range), an LUT8 value is converted to a direct color value based on the current source palette to determine whether or not it is within the specified range.