diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-07-03 05:29:03 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-03 05:29:03 +0000 |
commit | 3440d61a37d1de63fc8d831ec5ceecfc2faea206 (patch) | |
tree | 607e0fbee31768b16f04e9f008a68df4b6c28bd0 /gdk-pixbuf/pixops | |
parent | f702d2cfa937444fbca1e3635cc8dd27ae416426 (diff) | |
download | gdk-pixbuf-3440d61a37d1de63fc8d831ec5ceecfc2faea206.tar.gz |
Correct the math to calculate bilinear weights. (#112412, Brian Cameron)
Sat Jul 3 00:41:44 2004 Matthias Clasen <maclas@gmx.de>
* pixops/pixops.c (bilinear_box_make_weights): Correct the
math to calculate bilinear weights. (#112412, Brian Cameron)
Diffstat (limited to 'gdk-pixbuf/pixops')
-rw-r--r-- | gdk-pixbuf/pixops/pixops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c index e4a086c2f..6f629d90b 100644 --- a/gdk-pixbuf/pixops/pixops.c +++ b/gdk-pixbuf/pixops/pixops.c @@ -1312,7 +1312,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim, dim->n = n; dim->weights = pixel_weights; - for (offset =0 ; offset < SUBSAMPLE; offset++) + for (offset = 0; offset < SUBSAMPLE; offset++) { double x = (double)offset / SUBSAMPLE; double a = x + 1 / scale; @@ -1320,7 +1320,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim, for (i = 0; i < n; i++) { w = linear_box_half (0.5 + i - a, 0.5 + i - x); - w += linear_box_half (1.5 + x - i, 1.5 + a - i); + w += linear_box_half (0.5 + x - i, 0.5 + a - i); *(pixel_weights++) = w * scale; } |