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 */