[gimp/soc-2011-seamless-clone2] Bug 695418 - Unsharp mask crashes for large radii
- From: Clayton Walker <claytonw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-seamless-clone2] Bug 695418 - Unsharp mask crashes for large radii
- Date: Wed, 8 May 2013 15:10:07 +0000 (UTC)
commit f463b4ef81a868947d05bd6d31e76e6ee94eef7b
Author: Téo Mazars <teo mazars ensimag fr>
Date: Sun Apr 7 22:29:56 2013 +0200
Bug 695418 - Unsharp mask crashes for large radii
Make sure we are working on the image range
plug-ins/common/unsharp-mask.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/unsharp-mask.c b/plug-ins/common/unsharp-mask.c
index a00da3d..252b083 100644
--- a/plug-ins/common/unsharp-mask.c
+++ b/plug-ins/common/unsharp-mask.c
@@ -368,7 +368,7 @@ box_blur_line (const gint box_width, /* Width of the kernel */
/* If the leading edge has gone off the image, but the output and
* trailing edge are on the image. (The big loop exits when the
* output goes off the image. */
- else
+ else if (trail >= 0)
{
for (i = 0; i < bpp; i++)
{
@@ -376,6 +376,13 @@ box_blur_line (const gint box_width, /* Width of the kernel */
dest[bpp * output + i] = (ac[i] + (coverage >> 1)) / coverage;
}
}
+ /* Leading has gone off the image and trailing isn't yet in it
+ * (small image) */
+ else if (output >= 0)
+ {
+ for (i = 0; i < bpp; i++)
+ dest[bpp * output + i] = (ac[i] + (coverage >> 1)) / coverage;
+ }
lead++;
output++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]