Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. foreach (byte b in arr)
  2. {
  3. if (W != -1 && H != -1 && range != -1)
  4. {
  5. if (R == -1)
  6. {
  7. R = (int)(b);
  8. }
  9. else if (G == -1)
  10. {
  11. G = (int)(b);
  12. }
  13. else if (B == -1)
  14. {
  15. B = (int)(b);
  16. bitmap.SetPixel(currentBitW, currentBitH, Color.FromArgb(R, G, B));
  17. R = -1;
  18. G = -1;
  19. B = -1;
  20. currentBitW++;
  21. if (currentBitW == W)
  22. {
  23. currentBitW = 0;
  24. currentBitH++;
  25. }
  26. }
  27. }
  28. else
  29. {
  30. //comment
  31. if (b == (byte)('#'))
  32. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement