OverlayBitmap::setDropOutColor Method

Sets the dropout color.
Syntax:
bool setDropOutColor( COLORREF color);
Parameter Description
color

Specifies the color that is used as a dropout color. The color can be specified with the RGB macro. The default dropout color is black (RGB(0,0,0))

Return value:

true on success, false otherwise.

Remarks:

The dropout color determines, which pixels of the overlay bitmap are not copied to the live video. Each dropout colored pixel of the overlay bitmap is not copied on the video sample.

If the video format or the sinktype is an RGB color format such as RGB555, RGB565, RGB24 or RGB32, the dropout color can be specified with the standard RGB macro. For example, if the dropout color is magenta, it can be specified with RGB(255,0,255).

If a monochrome RGB8 video format or sinktype is used, the dropout color can also be specified using the RGB macro. The single values for red, green and blue must be equal to each other: RGB(100,100,100). IC Imaging Control tries to find the nearest color to the specified dropout color in the color palette of the overlay bitmap. If no matching color is found, the video can not be seen. Instead of the live video a only non-transparent bitmap is displayed. If a bitmap is unintentional not transparent, another dropout color can be used.

The default dropout color is black (RGB(0,0,0)). If the overlay bitmap is created, it is filled with this color automatically.

Sample:

This example demonstrates how to fill the complete overlay bitmap with the color magenta that was set as the current dropout color. This makes the complete overlay bitmap transparent on the video stream.

smart_ptr<DShowLib::OverlayBitmap> pOverlayBitmap;
pOverlayBitmap = m_Grabber.getOverlay( ePP_DEVICE );
pOverlayBitmap->setDropOutColor( RGB(255,0,255));   // Magenta
// Fill the bitmap with the dropout color to make it completely transparent.
pOverlayBitmap->fill(pOverlayBitmap->getDropOutColor());

See also: OverlayBitmap, OverlayBitmap::fill, OverlayBitmap::getDropOutColor

<< OverlayBitmap