OverlayBitmap::setColorMode Method |
||||||||||||||||||||||||||||||||
Set the color mode of this OverlayBitmap. The color mode determines, whether the overlay bitmap is painted in color or grayscale. The images provided by the video capture device are converted into the selected format before drawing the overlay. | ||||||||||||||||||||||||||||||||
Syntax: | bool setColorMode( tOVBColorMode newMode ); |
|||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Return value: |
|
|||||||||||||||||||||||||||||||
Remarks: | The color mode can only be changed, if the Grabber which owns this OverlayBitmap is not in live or prepared mode. |
|||||||||||||||||||||||||||||||
Information: | Introduced in version 3.0 | |||||||||||||||||||||||||||||||
Example: | The following example shows how to enable the overlay bitmap for the display path and force it to color mode: // Check whether the OverlayBitmap object can be inserted in front of the // display. if( !m_Grabber.setOverlayBitmapPathPosition(ePP_DISPLAY) ) { MessageBox( m_Grabber.getLastError().toStringW().c_str(),L"Error",MB_ICONERROR); } else { smart_ptr<DShowLib::OverlayBitmap> pOverlayBitmap; pOverlayBitmap = m_Grabber.getOverlay(ePP_DISPLAY); // Set the color mode to grayscale. pOverlayBitmap->setColorMode( OverlayBitmap::eCOLOR ); } After this initialization, colored drawings can be placed onto the live display. The original, grayscale image data is sent to the sink in its original form. |
|||||||||||||||||||||||||||||||
See also: | OverlayBitmap, OverlayBitmap::getColorMode, OverlayBitmap::tOVBColorMode, OverlayBitmap::getColorformat |