Hi,
I have an application where I am storing images captured by camera in 320 * 480 format. But while loading this image I want to resize the image up to 32 * 32 OR 49 * 37. Can someone let me know how could we load the image or how could we store the images captured by camera in desired format / size.
EDIT
-----
Hi,
I am getting the error while exiting even if I use the release DC. PFB the code
I am trying to load big image and trying to resize it to smaller size.
CImage img;
CImage sm_img;
HRESULT res = img.Load(_T("D:\\bbb.png"));
CDC *screenDC = GetDC();
int iNewWidth = 80;
int iNewHeight = 60;
sm_img.Create(iNewWidth, iNewHeight,32);
SetStretchBltMode(sm_img.GetDC(),COLORONCOLOR);
img.StretchBlt(sm_img.GetDC(),0, 0, iNewWidth, iNewHeight, SRCCOPY);
HDC hdcpic = ::GetDC(hMyWindow);
img.StretchBlt( hdcpic,0, 0, iNewWidth, iNewHeight, SRCCOPY);
sm_img.Save(_T("D:\\bbb1.png"));
sm_img.ReleaseDC(); ReleaseDC(screenDC);
Please suggest me what could be the problem.
Thanks in advance.