GDI+ Image clone
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all Will I am using GDI+ to manipulate images. I am having this strange behaviour with Bitmap::Clone() function. When I create a Clone from an Image object, and then try to LockBits for the cloned image, I get invalid pointer. I did a workarround for this: Bitmap* p_new_image = new Bitmap(p_src_image->GetWidth(),p_src_image->GetHeight(),p_src_image->GetPixlFormat()); Graphics* p_graphics = Graphics::FromImage(p_new_image); p_graphics->DrawImage(p_src_image,0,0); delete p_graphics; will this code is working with LockBits very fine. The documentation for the clone function is not clear, is this a bug in the Clone function, or I didnt understad the Clone function will? Regards Hesahm Hesham