rem: s = image->data+t;
add: s = image->data+(t<<2);
context: RScaleImage(RImage *image, unsigned new_width, unsigned new_height){    int ox;    int px, py;    register int x, y, t;    int dx, dy;    unsigned char *s;    unsigned char *d;    RImage *img;    assert(new_width >= 0 && new_height >= 0);    if (new_width == image->width && new_height == image->height)	return RCloneImage(image);    img = RCreateImage(new_width, new_height, image->format==RRGBAFormat);        if (!img)      return NULL;    /* fixed point math idea taken from Imlib by      * Carsten Haitzler (Rasterman) */    dx = (image->width<<16)/new_width;    dy = (image->height<<16)/new_height;    py = 0;        d = img->data;    if (image->format == RRGBAFormat) {	int ot;	ot = -1;	for (y=0; y<new_height; y++) {	    t = image->width*(py>>16);	    s = image->data+t;	    ot = t;	    ox = 0;	    px = 0;	    for (x=0; x<new_width; x++) {		px += dx;		*(d++) = *(s);		*(d++) = *(s+1);		*(d++) = *(s+2);		*(d++) = *(s+3);				t = (px - ox)>>16;		ox += t<<16;		    		s += t<<2; /* t*4 */	    }	    py += dy;	}    } else {	int ot;	ot = -1;	for (y=0; y<new_height; y++) {	    t = image->width*(py>>16);	    s = image->data+t;	    	    ot = t;	    ox = 0;	    px = 0;	    for (x=0; x<new_width; x++) {		px += dx;				*(d++) = *(s);		*(d++) = *(s+1);		*(d++) = *(s+2);				t = (px-ox)>>16;		ox += t<<16;				s += (t<<1)+t; /* t*3 */	    }	    py += dy;	}    }        return img;}