Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. void uncoverMessage()
  2. {
  3.  
  4. StringBuilder bits = new StringBuilder();
  5. int[] arr = new int[3];
  6. for (int x = 0; x < image.Width; x++)
  7. {
  8. for (int y = 0; y < image.Height; y++)
  9. {
  10. Color pixelColor2 = image.GetPixel(x, y);
  11. arr[0] = pixelColor2.R % 2;
  12. arr[1] = pixelColor2.G % 2;
  13. arr[2] = pixelColor2.B % 2;
  14. for(int i = 0; i < 3; i++)
  15. {
  16. bits.Append(arr[i].ToString());
  17. if(bits.Length == 8)
  18. {
  19. richTextBox2.Text += getChar(bits.ToString());
  20. bits.Clear();
  21. }
  22. }
  23. }
  24. }
  25. label5.Text = "Długość tekstu: " + richTextBox2.Text.Length;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement