IC Imaging Control C++



The OverlayBitmap object is used to draw graphical elements like lines and text onto the video stream.

There are three possible locations where overlay objects may be inserted in the image stream:

  • Behind the device ( Device Path ): this overlay will appear in the display as well as in the sink (ring buffer, stream file)
  • In front of the display ( Display Path ): this overlay will appear in the display only
  • In front of the sink ( Sink Path ): this overlay will appear in the sink (ring buffer, stream file) only

Internally, the OverlayBitmap object uses a bitmap (HBITMAP) for drawing text and graphical elements on the video stream. Its size and color depth are dependent on the video format of the currently active video capture device and all frame filters that are inserted between the device and itself. Therefore, the internal bitmap is destroyed and recreated, if:

  • the device's video format is changed,
  • the sink's video format is changed because it may require automatic color space conversion somewhere in front of the overlay,
  • frame filters are inserted/removed between the device and the overlay
  • parameters of a frame filter that are inserted between the device and the overlay are altered in a way that the video format of the image stream is changed.

The color format of the overlay is determined by the objects that are located in front and behind it in the image stream. In addition, the color format can be forced to monochrome or RGB with a call to OverlayBitmap::setColorMode.

The functionality of the OverlayBitmap object is not available and the method OverlayBitmap::canRender returns false in two cases:

  • the sink's color format is set to YUV
  • the filter that is inserted just behind the overlay requires YUV as the input format

Pointers to instances of OverlayBitmap objects can be retrieved with a call to the Grabber's method Grabber::getOverlay.


Header File: tisudshl.h
Namespace: DShowlib
Introduced in version 1.x


Method Description

Prepares the overlay bitmap for graphic operations.


Returns whether the framework is able to render the overly on the video stream.


Draws the frame of an ellipse on the live video.


Draws the frame of a rectangle on the live video.


Draws a line on the live video.


Draws a solid ellipse on the live video.


Draws a solid rectangle on the live video.


Draws a text on the live video.


Releases the overlay bitmap from the internal device context.


Fills the entire overlay bitmap with the specified color.


Returns the currently selected color mode of this OverlayBitmap.


Returns the current color format used for the overlay.


Returns the device context.


Returns the currently used dropout color.


Returns whether the overlay is visible on the live video stream.


Returns whether the overlay bitmap is displayed vertically flipped on the video.


Retrieves a pointer to an IFont COM font object pointer.


Returns the background color for text drawings.


Returns the background mode for text drawings.


Returns a FrameTypeInfo object describing the current format of this OverlayBitmap.


Returns the height of the OverlayBitmap.


Returns the path position of this OverlayBitmap.


Returns the width of the OverlayBitmap.


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.


Sets the dropout color.


Enables or disables the display of the overlay bitmap on the live video.


Enables or disables the vertical flip of the overlay bitmap.


Sets the OverlayBitmaps object font to the specified font.


Sets the background color for drawing text to the specified color value, or to the nearest physical color if the device cannot represent the specified color value.


Sets the background mode for text drawings.


Enumeration Description

The members of this enumeration are used to set the color format of the OverlayBitmap, using setColorMode.

<< Classes

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

ISO 9001:2015 certified MVTEC | Edge AI + Vision Alliance | EMVA

Contact us