Commit 4911eef2 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 4a6b6aa4
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)
......
......@@ -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;
}
......
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