Really fix the math to make the vectors sum up to 1, making

2005-01-02  Matthias Clasen  <mclasen@redhat.com>

	* pixops/pixops.c (bilinear_box_make_weights): Really fix the
	math to make the vectors sum up to 1, making GDK_INTERP_HYPER
	work again. (#162703, Dennis Nezic)
This commit is contained in:
Matthias Clasen 2005-01-02 07:10:30 +00:00 committed by Matthias Clasen
parent 4a6b6aa45c
commit 4911eef232
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-01-02 Matthias Clasen <mclasen@redhat.com>
* pixops/pixops.c (bilinear_box_make_weights): Really fix the
math to make the vectors sum up to 1, making GDK_INTERP_HYPER
work again. (#162703, Dennis Nezic)
2004-12-27 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file)

View File

@ -1313,7 +1313,7 @@ static void
bilinear_box_make_weights (PixopsFilterDimension *dim,
double scale)
{
int n = ceil (1/scale + 2.0);
int n = ceil (1/scale + 3.0);
double *pixel_weights = g_new (double, SUBSAMPLE * n);
double w;
int offset, i;
@ -1330,7 +1330,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 (0.5 + x - i, 0.5 + a - i);
w += linear_box_half (1.5 + x - i, 1.5 + a - i);
*(pixel_weights++) = w * scale;
}