Last active
November 15, 2019 14:25
-
-
Save 0o001/3c35f3c565e8a38bc67503ada32b140c to your computer and use it in GitHub Desktop.
how to Image Blur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Resmi blur yapma | |
private Bitmap Blur(Image img) | |
{ | |
Bitmap pic = new Bitmap(img); | |
for (int w = 0; w < pic.Width; w++) | |
{ | |
for (int h = 0; h < pic.Height; h++) | |
{ | |
Color c = pic.GetPixel(w, h); | |
Color newC = Color.FromArgb(80, c); | |
//if (c.ToArgb() != 0) | |
pic.SetPixel(w, h, newC); | |
} | |
} | |
return pic; | |
} | |
obje.Image = Blur(obje.Image); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment