View Full Version : Video over Video

Wolfgang P.
May 28, 2006, 22:34:59
Dear Support,

I am evaluatuing your control and this looks very promising.

Using VB6 under Windows XP I would like to do the following:

I have two devices delivering videostreams and I want to overlay one, smaller videostream over the main stream to be able to in the end, once an event has halted both streams, save the last picture with the combined frames.

I had considered using the imageavailable event of the smaller stream to grab the frame of the smaller video and then place it onto the overlay of the main video. That would have to be done such that this overlay would be visible on the screen but also on the saved image.

Is that the best way to do it?

Or would it be better having both streams frozen seperately and THEN combine the bitmaps to display and save them?

Regards and thanks in advance


Stefan Geissler
May 29, 2006, 14:29:47

Your first approach is correct. In the ImageAvailabe event sub of the smaller stream you can get a pointer to the image data with the ImageBuffer.ImageDataPtr property. This long pointer value can be passed to the GDI StretchDIBits function, that "blits" (copies) the image into an HDC. This HDC can be retrieved from the OverlayBitmap of the second stream with ICImagingControl1.Overlay.GetDC().
You may have a look to
In the sample the BitBlt() GDI function is used. You would need the StretchDIBits() funktion. The OverlayBitmap is copied on the frames directly, so if you would save an image from the second stream, the image of the Ovleray would be saved inside visible of it.

May 31, 2006, 13:20:35

thank you for the information. It worked out nicely. I still use the BitBlt function because the smaller stream does not have to be scaled to match the larger stream.

I purchased the Control today after having evaluated it during the last week. I'd like to mention that your support was the final element in making the decision to buy this SDK. I've been looking for something like this for several years.



Stefan Geissler
May 31, 2006, 13:36:05

Thank you for your feedback! :-)

March 11, 2008, 10:16:25
Hello Support,

the above mentioned sample code apears to be not active:

Could you please repost the above example.

many thanks

March 11, 2008, 10:22:37

Try this link instead :



Stefan Geissler
March 11, 2008, 11:30:25
Parts of the server are currently down. We are working on this issue.