Home > Net >  C # BitMap GetHbitmap () takes a high is there any way
C # BitMap GetHbitmap () takes a high is there any way

Time:09-22

IntPtr hdcPtr=um participant raphics. GetHdc ();
IntPtr memdcPtr=CreateCompatibleDC (hdcPtr);//create a compatible DC
//takes higher
IntPtr bmpPtr=MainImage. GetHbitmap ();
SelectObject (memdcPtr bmpPtr);
BitBlt (hdcPtr, 0, 0, MainImage. Width, MainImage. Height, memdcPtr, 0, 0, SRCCOPY);
DeleteDC (memdcPtr);
DeleteObject (bmpPtr);
Um participant raphics. ReleaseHdc (hdcPtr);


Now draw a need 11 milliseconds, this function alone account for about 8 milliseconds
  •  Tags:  
  • C#
  • Related