I am drawing bitmap images on graphics object using DrawImage method But the Images are in large number so it is taking too much time for Drawing. I have read in this forum that using StretchDIBits takes less time for Drawing. I am scaling the image by calling Drawimage but i want any other efficent method. I have a Vector of Bitmap* & i want to draw each Bitmap on graphics.
HDC orghDC = graphics.GetHDC();
CDC *dc = CDC::FromHandle(orghDC);
m_vImgFrames is image vector containg Bitmap*
. I have taken HBITMAP from Bitmap*
.
HBITMAP hBitmap;
m_vImgFrames[0]->GetHBITMAP(Color(255,0,0),&hBitmap);
Using this HBITMAP i want to draw on orghDC & finally on graphics. So I want to know how StretchDIBits can be used for scaling the Bitmap and finally draw on Graphics Object.
I am new to this forum.Any ideas or code can be helpful