rem: XFreePixmap(dpy, pixmap); if ( fimage) RReleaseImage( image); } break;
add: XFreePixmap(dpy, pixmap); if (fimage) { RReleaseImage( image); } } break;
context: void applyImage( RContext * rc, BackgroundTexture *texture, RImage *image, char type, int x, int y, int width, int height) {    int w, h;    Bool fimage = False;    switch( toupper(type)) {	case 'S':	case 'M':	    if ( type == 'S') {		w = width;		h = height;	    } else {		if ( image->width*height > image->height*width) {		    w = width;		    h = (width*image->height) / image->width;		} else {		    w = (height*image->width) / image->height;		    h = height;		}	    }	    if ( w != image->width || h != image->height) {		RImage * simage;		if ( smooth) {		    simage = RSmoothScaleImage( image, w, h);		} else {		    simage = RScaleImage( image, w, h);		}		if ( !simage) {		    wwarning( "could not scale image:%s", RMessageForError(RErrorCode));		    return;		}		fimage = True;		image = simage;	    }	    /* fall through */	case 'C':	    {		Pixmap pixmap;		if ( !RConvertImage(rc, image, &pixmap)) {		    wwarning( "could not convert texture:%s", RMessageForError(RErrorCode));		    return;		}		if ( image->width != width || image->height != height) {		    int sx, sy, w, h;		    if ( image->height < height) {			h = image->height;			y += (height - h) / 2;			sy = 0;		    } else {			sy = (image->height - height) / 2;			h = height;		    }		    if ( image->width < width) {			w = image->width;			x += (width - w) / 2;			sx = 0;		    } else {			sx = (image->width - width) / 2;			w = width;		    }		    XCopyArea(dpy, pixmap, texture->pixmap, DefaultGC(dpy, scr), sx, sy, w, h, x, y);		} else 		    XCopyArea(dpy, pixmap, texture->pixmap, DefaultGC(dpy, scr), 0, 0, width, height, x, y);		XFreePixmap(dpy, pixmap);		if ( fimage) RReleaseImage( image);	    }	    break;    }}