Commit f8e1ed82 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 6a9e6733
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)
Mon Jun 21 00:44:51 2004 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-transform.h:
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment