mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Update ImageHelpers.cs
Index Out Of Range when using Blur filter on a portrait picture y maximum is 'y < h' so newColors array should be sized from h, not w
This commit is contained in:
parent
f7951f4b75
commit
2a6e66cf18
1 changed files with 2 additions and 2 deletions
|
@ -1112,7 +1112,7 @@ private static void BoxBlurVertical(UnsafeBitmap unsafeBitmap, int range)
|
|||
int w = unsafeBitmap.Width;
|
||||
int h = unsafeBitmap.Height;
|
||||
int halfRange = range / 2;
|
||||
ColorBgra[] newColors = new ColorBgra[w];
|
||||
ColorBgra[] newColors = new ColorBgra[h];
|
||||
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
|
@ -1585,4 +1585,4 @@ public static void DrawColorPickerIcon(Graphics g, Color color, Rectangle rect,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue