Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void uncoverMessage()
- {
- StringBuilder bits = new StringBuilder();
- int[] arr = new int[3];
- for (int x = 0; x < image.Width; x++)
- {
- for (int y = 0; y < image.Height; y++)
- {
- Color pixelColor2 = image.GetPixel(x, y);
- arr[0] = pixelColor2.R % 2;
- arr[1] = pixelColor2.G % 2;
- arr[2] = pixelColor2.B % 2;
- for(int i = 0; i < 3; i++)
- {
- bits.Append(arr[i].ToString());
- if(bits.Length == 8)
- {
- richTextBox2.Text += getChar(bits.ToString());
- bits.Clear();
- }
- }
- }
- }
- label5.Text = "Długość tekstu: " + richTextBox2.Text.Length;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement