Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsafe
- {
- // Get a pointer to the back buffer.
- // Find the address of the pixel to draw.
- int color_data;
- int pBackBuffer;
- for (i = 0; i < tocopy_bmp.Height; ++i) //tocopy_bmp.height
- {
- for (j = 0; j < tocopy_bmp.Width; ++j) //tocopy_bmp.width
- {
- pBackBuffer = (int)tocopy_bmp.BackBuffer;
- pBackBuffer += i * tocopy_bmp.BackBufferStride;
- pBackBuffer += j * 4;
- color_data = *((int*)pBackBuffer); // this line will increase RAM usage by ~380MB
- }
- }
- }
Add Comment
Please, Sign In to add comment