aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/filters.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filters.c b/src/filters.c
index adb291ba..dfbe353f 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -90,9 +90,10 @@ static void noise_filter(struct image *image)
int dx, dy;
int val = image->data[x+image->width*y];
- if ( (x==1) || (x==image->width-1)
- || (y==1) || (y==image->height-1) ) {
+ if ( (x==0) || (x==image->width-1)
+ || (y==0) || (y==image->height-1) ) {
if ( val < 0 ) val = 0;
+ continue;
}
for ( dx=-1; dx<=+1; dx++ ) {