Click here to Skip to main content
15,993,349 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m trying to overlay an image on a live video.The IDE used is Visual Studio Professional 2010. The code is developed in C++.I m loading the image using a handle i.e.


HANDLE hBitmap;

hBitmap = LoadImage(NULL, L"C:\\Users\\User\\Documents\\Visual Studio 2010\\Projects\\BMP_Image.bmp",IMAGE_BITMAP, 0,0, LR_LOADFROMFILE );

I have to load this image and overlay it on to the video at a specific location.

I m passing the ID of a picture control, placed on the dialog box in the rc file, to load the live video and display it. I m not using any MFCs in the code. The video is rendered by using Direct 2D mechanism. I overlay the image on to the video using ALPHA BLENDING.
The video resolution is 640*480. and the image resolution is 128*128. If I overlay this image , I will get five times overlayed image.
And the overlayed image will come at(0,0) position of the Picture control.

I have the following doubts:

· How can I get the inside coordinates(x,y) of the picture control???

· How to put the image on picture control with respect to (x,y)?? over the video?


Looking forward for a positive response at the earliest.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900