Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static Bitmap Kutter(Bitmap image, string hash)
- {
- int x = 0;
- for (int y = 0; y < 64; y++)
- {
- Color c = image.GetPixel(x, y);
- byte newB;
- byte r = 2;
- if (hash[y] == '1')
- newB = (byte)(c.B + 0.1 * r * (0.3 * c.R + 0.59 * c.G + 0.11 * c.B));
- else
- newB = (byte)(c.B - 0.1 * r * (0.3 * c.R + 0.59 * c.G + 0.11 * c.B));
- image.SetPixel(x, y, Color.FromArgb(c.A, c.R, c.G, newB));
- x++;
- }
- return image;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement