View Full Version : Prevent Overlays in Sink: setOverlayBitmapPathPosition

January 13, 2006, 00:54:27

I want to make overlays visible in a Display, but not in the Sink (memory buffer).
To do this, I just upgraded to IC Imaging Control 3.0 so that I could use the setOverlayBitmapPathPosition method in the Grabber object. My grabber object is called m_Grabber, and I have these lines in my OnPreviewStart() handler:

m_Grabber.setOverlayBitmapPathPosition(ePP_DISPLAY );

This should show overlays on the Display, but NOT on the frames grabbed in the COverlayCallback::frameReady() handler. However, overlays do not appear on either the Display or the frames grabbed in frameReady(). I see no overlays on the Display or frameReady() when using ePP_SINK either.

But ePP_DEVICE works: overlays show on Display and frameReady(). And ePP_NONE works: it does not show overlays anywhere.

Can anyone tell me how to show overlays on the Display but not on

Running: MSVC++ .NET 2003
IC Imaging Control 3.0


Stefan Geissler
January 16, 2006, 12:33:02
Hello Selwyn,

Please excuse the long delay of my answer. The following code wont work, because the overlay is enabled at the display position only. But the call to getOverlay() without parameters will return the overlay object at the device position:

m_cGrabber.setOverlayBitmapPathPosition(ePP_DISPLA Y);

m_cGrabber.getOverlay()->drawText( RGB(255,0,0), 0, 0, "Hello World" );

So enhance you code as follows and pass ePP_DISPLAY to getOverlay():

m_cGrabber.setOverlayBitmapPathPosition(ePP_DISPLA Y);

m_cGrabber.getOverlay(ePP_DISPLAY)->drawText( RGB(255,0,0), 0, 0, "Hello World" );

Now the overlay text "Hello World" is visible on the live video but it is not in the sink, that means in the images that are available in the Membuffer collection.