rem: *ptr++ = (((int)*ptr * nalpha) + (r * alpha))/256; *ptr++ = (((int)*ptr * nalpha) + (g * alpha))/256; *ptr++ = (((int)*ptr * nalpha) + (b * alpha))/256;
add: *ptr = (((int)*ptr * nalpha) + (r * alpha))/256; ptr++; *ptr = (((int)*ptr * nalpha) + (g * alpha))/256; ptr++; *ptr = (((int)*ptr * nalpha) + (b * alpha))/256; ptr++;
context: RPutPixel(RImage *image, int x, int y, RColor *color){    unsigned char *ptr;    assert(image!=NULL);    assert(color!=NULL);    if (x < 0 || x >= image->width || y < 0 || y >= image->height)	return;    if (image->format == RRGBAFormat) {	ptr = image->data + (y*image->width + x) * 4;    } else {	ptr = image->data + (y*image->width + x) * 3;    }    if (color->alpha==255) {	*ptr++ = color->red;        *ptr++ = color->green;        *ptr++ = color->blue;	if (image->format == RRGBAFormat) {	    *ptr = 255;	}    } else {        register int alpha, nalpha, r, g, b;        r = color->red;        g = color->green;        b = color->blue;        alpha = color->alpha;        nalpha = 255 - alpha;        *ptr++ = (((int)*ptr * nalpha) + (r * alpha))/256;        *ptr++ = (((int)*ptr * nalpha) + (g * alpha))/256;        *ptr++ = (((int)*ptr * nalpha) + (b * alpha))/256;        if (image->format == RRGBAFormat) {            *ptr = alpha + ((int)*ptr * nalpha)/256;	}    }}