Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1.  
  2. void drawBmp(DIB dib, PixelArray arr)
  3. {
  4. HWND console = GetConsoleWindow();
  5. HDC hdc = GetDC(console);
  6.  
  7. for (int i = 0; i < dib.heightImage; i++)
  8. for (int j = 0; j < dib.widthImage; j++)
  9. {
  10. Color pixel = arr.data[i][j];
  11. SetPixel(hdc, j, i, RGB(pixel.red, pixel.green, pixel.blue));
  12. }
  13.  
  14. ReleaseDC(console, hdc);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement