Created
April 14, 2013 12:12
-
-
Save MhdSyrwan/5382486 to your computer and use it in GitHub Desktop.
An Image Processing Helper
This file contains hidden or 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
using System; | |
namespace System | |
{ | |
namespace Drawing | |
{ | |
public static class Processing | |
{ | |
public static void Process (this Bitmap img, Func<int,int,Color,Color> action) | |
{ | |
for (int x = 0; x < img.Width; x++) { | |
for (int y = 0; y < img.Height; y++) { | |
img.SetPixel (x, y, action (x, y, img.GetPixel (x, y))); | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment