From b7296cff161d16278ec3b4834a1aa42f1c003a6c Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 15 Jan 2000 22:11:18 +0000 Subject: [PATCH] Fixed a bug in scaling code. --- wrlib/scale.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wrlib/scale.c b/wrlib/scale.c index d201ff83..03bc2349 100644 --- a/wrlib/scale.c +++ b/wrlib/scale.c @@ -79,14 +79,11 @@ RScaleImage(RImage *image, unsigned new_width, unsigned new_height) d = img->data; if (image->format == RRGBAFormat) { - int ot; - ot = -1; for (y=0; ywidth*(py>>16); - s = image->data+t; + s = image->data+(t<<2); /* image->data+t*4 */ - ot = t; ox = 0; px = 0; for (x=0; xwidth*(py>>16); - s = image->data+t; + s = image->data+(t<<1)+t; /* image->data+t*3 */ - ot = t; ox = 0; px = 0; for (x=0; x>16; + t = (px - ox)>>16; ox += t<<16; s += (t<<1)+t; /* t*3 */ -- 2.11.4.GIT