rem: unsigned char *d = image->data; int i;  for (i = 0; i < image->width; i++) { *d++ = color->red; *d++ = color->green; *d++ = color->blue; *d++ = color->alpha; } for (i = 1; i < image->height; i++, d += image->width*4) { memcpy(d, image->data, image->width*4); }
add: for (i = 0; i < image->width; i++) { *d++ = color->red; *d++ = color->green; *d++ = color->blue; *d++ = color->alpha; } lineSize = image->width*4; for (i = 1; i < image->height; i++, d+=lineSize) { memcpy(d, image->data, lineSize); }
context: RFillImage(RImage *image, RColor *color){    if (image->format == RRGBAFormat) {	    unsigned char *d = image->data;	    int i;	    for (i = 0; i < image->width; i++) {		*d++ = color->red;		*d++ = color->green;		*d++ = color->blue;		*d++ = color->alpha;	    }	    for (i = 1; i < image->height; i++, d += image->width*4) {		memcpy(d, image->data, image->width*4);	    }    } else {	    unsigned char *d = image->data;	    int i;	    for (i = 0; i < image->width; i++) {		*d++ = color->red;		*d++ = color->green;		*d++ = color->blue;	    }	    for (i = 1; i < image->height; i++, d += image->width*3) {		memcpy(d, image->data, image->width*3);	    }    }}