Compare commits

...

2 Commits

2 changed files with 10 additions and 1 deletions
+3
View File
@@ -23,6 +23,9 @@ namespace AgraV2
if (inputBmp == null) if (inputBmp == null)
return null; return null;
//This is important for when the user wants to re apply an effet
ProcessingDuration = new List<double>();
Bitmap[] result = new Bitmap[] { useGetSetPixel(inputBmp), useByteArray(inputBmp), usePointers(inputBmp)}; Bitmap[] result = new Bitmap[] { useGetSetPixel(inputBmp), useByteArray(inputBmp), usePointers(inputBmp)};
return result; return result;
} }
+7 -1
View File
@@ -46,6 +46,12 @@ namespace AgraV2
} }
public override Bitmap[] apply(Bitmap inputBmp) public override Bitmap[] apply(Bitmap inputBmp)
{ {
if (inputBmp == null)
return null;
//This is important for when the user wants to re apply an effet
ProcessingDuration = new List<double>();
Bitmap[] result = new Bitmap[] { medianFilter(inputBmp) }; Bitmap[] result = new Bitmap[] { medianFilter(inputBmp) };
return result; return result;
} }
@@ -80,7 +86,7 @@ namespace AgraV2
List<int> Greens = new List<int>(); List<int> Greens = new List<int>();
List<int> Reds = new List<int>(); List<int> Reds = new List<int>();
List<Point> surroundingPixels = getSurroundingPixels(new Point(x, y), 2, imgSize.Width, inputBmp.Height); List<Point> surroundingPixels = getSurroundingPixels(new Point(x, y), Radius, imgSize.Width, inputBmp.Height);
foreach (Point pixel in surroundingPixels) foreach (Point pixel in surroundingPixels)
{ {