Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int x = 0; x < width; x += 1)
- {
- for (int y = 0; y < height; y += 1)
- {
- fontColor = tempImage.GetPixel(x, y);
- index = rand.Next(image.Length);
- //Check if the color empty
- if (fontColor.Name == Color.Empty.Name)
- {
- for (int i = 0; i < image.Length; i++)
- {
- if (index == 0)
- {
- image[i].SetPixel(x * 2, y, Color.Black);
- image[i].SetPixel(x * 2 + 1, y, Color.Empty);
- }
- else
- {
- image[i].SetPixel(x * 2, y, Color.Empty);
- image[i].SetPixel(x * 2 + 1, y, Color.Black);
- }
- }
- }
- else
- {
- for (int i = 0; i < image.Length; i++)
- {
- if ((index + i) % image.Length == 0)
- {
- image[i].SetPixel(x * 2, y, Color.Black);
- image[i].SetPixel(x * 2 + 1, y, Color.Empty);
- }
- else
- {
- image[i].SetPixel(x * 2, y, Color.Empty);
- image[i].SetPixel(x * 2 + 1, y, Color.Black);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement