Index: uspace/app/gfxdemo/gfxdemo.c
===================================================================
--- uspace/app/gfxdemo/gfxdemo.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/app/gfxdemo/gfxdemo.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -215,4 +215,40 @@
 }
 
+/** Render circle to a bitmap.
+ *
+ * @param bitmap Bitmap
+ * @param w Bitmap width
+ * @param h Bitmap height
+ * @return EOK on success or an error code
+ */
+static errno_t bitmap_circle(gfx_bitmap_t *bitmap, gfx_coord_t w, gfx_coord_t h)
+{
+	int i, j;
+	int k;
+	pixelmap_t pixelmap;
+	gfx_bitmap_alloc_t alloc;
+	errno_t rc;
+
+	rc = gfx_bitmap_get_alloc(bitmap, &alloc);
+	if (rc != EOK)
+		return rc;
+
+	/* In absence of anything else, use pixelmap */
+	pixelmap.width = w;
+	pixelmap.height = h;
+	pixelmap.data = alloc.pixels;
+
+	for (i = 0; i < w; i++) {
+		for (j = 0; j < h; j++) {
+			k = i * i + j * j;
+			pixelmap_put_pixel(&pixelmap, i, j,
+			    k < w * w / 2 ? PIXEL(255, 0, 255, 0) :
+			    PIXEL(0, 255, 0, 255));
+		}
+	}
+
+	return EOK;
+}
+
 /** Run bitmap demo on a graphic context.
  *
@@ -329,6 +365,5 @@
 	return rc;
 }
-
-/** Run demo loop on a graphic context.
+/** Run bitmap color key demo on a graphic context.
  *
  * @param gc Graphic context
@@ -336,4 +371,61 @@
  * @param h Height
  */
+static errno_t demo_bitmap_kc(gfx_context_t *gc, gfx_coord_t w, gfx_coord_t h)
+{
+	gfx_bitmap_t *bitmap;
+	gfx_bitmap_params_t params;
+	int i, j;
+	gfx_coord2_t offs;
+	errno_t rc;
+
+	rc = clear_scr(gc, w, h);
+	if (rc != EOK)
+		return rc;
+
+	params.rect.p0.x = 0;
+	params.rect.p0.y = 0;
+	params.rect.p1.x = 40;
+	params.rect.p1.y = 40;
+	params.flags = bmpf_color_key;
+	params.key_color = PIXEL(0, 255, 0, 255);
+
+	rc = gfx_bitmap_create(gc, &params, NULL, &bitmap);
+	if (rc != EOK)
+		return rc;
+
+	rc = bitmap_circle(bitmap, 40, 40);
+	if (rc != EOK)
+		goto error;
+
+	for (j = 0; j < 10; j++) {
+		for (i = 0; i < 10; i++) {
+			offs.x = j * 20 + i * 20;
+			offs.y = i * 20;
+
+			rc = gfx_bitmap_render(bitmap, NULL, &offs);
+			if (rc != EOK)
+				goto error;
+		}
+
+		fibril_usleep(500 * 1000);
+
+		if (quit)
+			break;
+	}
+
+	gfx_bitmap_destroy(bitmap);
+
+	return EOK;
+error:
+	gfx_bitmap_destroy(bitmap);
+	return rc;
+}
+
+/** Run demo loop on a graphic context.
+ *
+ * @param gc Graphic context
+ * @param w Width
+ * @param h Height
+ */
 static errno_t demo_loop(gfx_context_t *gc, gfx_coord_t w, gfx_coord_t h)
 {
@@ -350,4 +442,8 @@
 
 		rc = demo_bitmap2(gc, w, h);
+		if (rc != EOK)
+			return rc;
+
+		rc = demo_bitmap_kc(gc, w, h);
 		if (rc != EOK)
 			return rc;
Index: uspace/drv/fb/kfb/port.c
===================================================================
--- uspace/drv/fb/kfb/port.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/drv/fb/kfb/port.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -90,4 +90,6 @@
 	gfx_bitmap_alloc_t alloc;
 	gfx_rect_t rect;
+	gfx_bitmap_flags_t flags;
+	pixel_t key_color;
 	bool myalloc;
 } kfb_bitmap_t;
@@ -203,4 +205,6 @@
 	gfx_coord2_subtract(&params->rect.p1, &params->rect.p0, &dim);
 	kfbbm->rect = params->rect;
+	kfbbm->flags = params->flags;
+	kfbbm->key_color = params->key_color;
 
 	if (alloc == NULL) {
@@ -298,12 +302,27 @@
 	gfx_rect_clip(&srect, &skfbrect, &crect);
 
-	for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) {
-		for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) {
-			gfx_coord2_subtract(&pos, &kfbbm->rect.p0, &sp);
-			gfx_coord2_add(&pos, &offs, &dp);
-
-			color = pixelmap_get_pixel(&pbm, sp.x, sp.y);
-			kfb->pixel2visual(kfb->addr +
-			    FB_POS(kfb, dp.x, dp.y), color);
+	if ((kfbbm->flags & bmpf_color_key) != 0) {
+		for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) {
+			for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) {
+				gfx_coord2_subtract(&pos, &kfbbm->rect.p0, &sp);
+				gfx_coord2_add(&pos, &offs, &dp);
+
+				color = pixelmap_get_pixel(&pbm, sp.x, sp.y);
+				if (color != kfbbm->key_color) {
+					kfb->pixel2visual(kfb->addr +
+					    FB_POS(kfb, dp.x, dp.y), color);
+				}
+			}
+		}
+	} else {
+		for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) {
+			for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) {
+				gfx_coord2_subtract(&pos, &kfbbm->rect.p0, &sp);
+				gfx_coord2_add(&pos, &offs, &dp);
+
+				color = pixelmap_get_pixel(&pbm, sp.x, sp.y);
+				kfb->pixel2visual(kfb->addr +
+				    FB_POS(kfb, dp.x, dp.y), color);
+			}
 		}
 	}
Index: uspace/lib/congfx/private/console.h
===================================================================
--- uspace/lib/congfx/private/console.h	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/lib/congfx/private/console.h	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -52,4 +52,6 @@
 	/** Console control structure */
 	console_ctrl_t *con;
+	/** Console bounding rectangle */
+	gfx_rect_t rect;
 	/** File for printing characters */
 	FILE *fout;
@@ -68,4 +70,8 @@
 	/** Rectangle covered by bitmap */
 	gfx_rect_t rect;
+	/** Bitmap flags */
+	gfx_bitmap_flags_t flags;
+	/** Key color */
+	pixel_t key_color;
 } console_gc_bitmap_t;
 
Index: uspace/lib/congfx/src/console.c
===================================================================
--- uspace/lib/congfx/src/console.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/lib/congfx/src/console.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -129,4 +129,6 @@
 	console_gc_t *cgc = NULL;
 	gfx_context_t *gc = NULL;
+	sysarg_t rows;
+	sysarg_t cols;
 	errno_t rc;
 
@@ -137,4 +139,8 @@
 	}
 
+	rc = console_get_size(con, &cols, &rows);
+	if (rc != EOK)
+		goto error;
+
 	rc = gfx_context_new(&console_gc_ops, cgc, &gc);
 	if (rc != EOK)
@@ -144,4 +150,9 @@
 	cgc->con = con;
 	cgc->fout = fout;
+	cgc->rect.p0.x = 0;
+	cgc->rect.p0.y = 0;
+	cgc->rect.p1.x = cols;
+	cgc->rect.p1.y = rows - 1; /* make sure we avoid bottom-right corner */
+
 	*rgc = cgc;
 	return EOK;
@@ -201,4 +212,6 @@
 	gfx_coord2_subtract(&params->rect.p1, &params->rect.p0, &dim);
 	cbm->rect = params->rect;
+	cbm->flags = params->flags;
+	cbm->key_color = params->key_color;
 
 	if (alloc == NULL) {
@@ -256,4 +269,5 @@
 	gfx_rect_t srect;
 	gfx_rect_t drect;
+	gfx_rect_t crect;
 	gfx_coord2_t offs;
 
@@ -270,6 +284,6 @@
 	}
 
-	// XXX Add function to translate rectangle
 	gfx_rect_translate(&offs, &srect, &drect);
+	gfx_rect_clip(&drect, &cbm->cgc->rect, &crect);
 
 	pixelmap.width = cbm->rect.p1.x - cbm->rect.p0.x;
@@ -277,18 +291,40 @@
 	pixelmap.data = cbm->alloc.pixels;
 
-	for (y = drect.p0.y; y < drect.p1.y; y++) {
-		console_set_pos(cbm->cgc->con, drect.p0.x, y);
-
-		for (x = drect.p0.x; x < drect.p1.x; x++) {
-			clr = pixelmap_get_pixel(&pixelmap,
-			    x - offs.x - cbm->rect.p0.x,
-			    y - offs.y - cbm->rect.p0.y);
-			console_set_rgb_color(cbm->cgc->con, clr, clr);
-
-			rv = fputc('X', cbm->cgc->fout);
-			if (rv < 0)
-				return EIO;
-
-			console_flush(cbm->cgc->con);
+	if ((cbm->flags & bmpf_color_key) == 0) {
+		for (y = crect.p0.y; y < crect.p1.y; y++) {
+			console_set_pos(cbm->cgc->con, crect.p0.x, y);
+
+			for (x = crect.p0.x; x < crect.p1.x; x++) {
+				clr = pixelmap_get_pixel(&pixelmap,
+				    x - offs.x - cbm->rect.p0.x,
+				    y - offs.y - cbm->rect.p0.y);
+				console_set_rgb_color(cbm->cgc->con, clr, clr);
+
+				rv = fputc('X', cbm->cgc->fout);
+				if (rv < 0)
+					return EIO;
+
+				console_flush(cbm->cgc->con);
+			}
+		}
+	} else {
+		for (y = crect.p0.y; y < crect.p1.y; y++) {
+			for (x = crect.p0.x; x < crect.p1.x; x++) {
+
+				clr = pixelmap_get_pixel(&pixelmap,
+				    x - offs.x - cbm->rect.p0.x,
+				    y - offs.y - cbm->rect.p0.y);
+				console_set_rgb_color(cbm->cgc->con, clr, clr);
+
+				if (clr != cbm->key_color) {
+					console_set_pos(cbm->cgc->con, x, y);
+					rv = fputc('X', cbm->cgc->fout);
+					if (rv < 0)
+						return EIO;
+
+					console_flush(cbm->cgc->con);
+				}
+
+			}
 		}
 	}
Index: uspace/lib/gfx/include/types/gfx/bitmap.h
===================================================================
--- uspace/lib/gfx/include/types/gfx/bitmap.h	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/lib/gfx/include/types/gfx/bitmap.h	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -38,4 +38,5 @@
 
 #include <errno.h>
+#include <io/pixel.h>
 #include <stddef.h>
 #include <types/gfx/coord.h>
@@ -44,8 +45,18 @@
 typedef struct gfx_bitmap gfx_bitmap_t;
 
+/** Bitmap flags */
+typedef enum {
+	/** Enable color key */
+	bmpf_color_key = 0x1
+} gfx_bitmap_flags_t;
+
 /** Bitmap parameters */
 typedef struct {
 	/** Rectangle represented in pixel array */
 	gfx_rect_t rect;
+	/** Bitmap flags */
+	gfx_bitmap_flags_t flags;
+	/** Key color */
+	pixel_t key_color;
 } gfx_bitmap_params_t;
 
Index: uspace/lib/guigfx/private/canvas.h
===================================================================
--- uspace/lib/guigfx/private/canvas.h	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/lib/guigfx/private/canvas.h	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -72,4 +72,8 @@
 	/** Rectangle covered by bitmap */
 	gfx_rect_t rect;
+	/** Bitmap flags */
+	gfx_bitmap_flags_t flags;
+	/** Key color */
+	pixel_t key_color;
 } canvas_gc_bitmap_t;
 
Index: uspace/lib/guigfx/src/canvas.c
===================================================================
--- uspace/lib/guigfx/src/canvas.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/lib/guigfx/src/canvas.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -197,4 +197,6 @@
 	gfx_coord2_subtract(&params->rect.p1, &params->rect.p0, &dim);
 	cbm->rect = params->rect;
+	cbm->flags = params->flags;
+	cbm->key_color = params->key_color;
 
 	if (alloc == NULL) {
@@ -259,4 +261,6 @@
 	gfx_coord2_t offs;
 	gfx_coord2_t dim;
+	gfx_coord_t x, y;
+	pixel_t pixel;
 
 	if (srect0 != NULL)
@@ -288,9 +292,21 @@
 	    PIXELMAP_EXTEND_TRANSPARENT_BLACK);
 
-	drawctx_t drawctx;
-	drawctx_init(&drawctx, cbm->cgc->surface);
-
-	drawctx_set_source(&drawctx, &source);
-	drawctx_transfer(&drawctx, drect.p0.x, drect.p0.y, dim.x, dim.y);
+	if ((cbm->flags & bmpf_color_key) == 0) {
+		drawctx_t drawctx;
+		drawctx_init(&drawctx, cbm->cgc->surface);
+
+		drawctx_set_source(&drawctx, &source);
+		drawctx_transfer(&drawctx, drect.p0.x, drect.p0.y, dim.x, dim.y);
+	} else {
+		for (y = drect.p0.y; y < drect.p1.y; y++) {
+			for (x = drect.p0.x; x < drect.p1.x; x++) {
+				pixel = source_determine_pixel(&source, x, y);
+				if (pixel != cbm->key_color) {
+					surface_put_pixel(cbm->cgc->surface,
+					    x, y, pixel);
+				}
+			}
+		}
+	}
 
 	update_canvas(cbm->cgc->canvas, cbm->cgc->surface);
Index: uspace/srv/hid/display/cursor.c
===================================================================
--- uspace/srv/hid/display/cursor.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/srv/hid/display/cursor.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -109,4 +109,6 @@
 	gfx_bitmap_params_init(&bparams);
 	bparams.rect = cursor->rect;
+	bparams.flags = bmpf_color_key;
+	bparams.key_color = PIXEL(0, 0, 255, 255);
 
 	if (cursor->bitmap == NULL) {
Index: uspace/srv/hid/display/types/display/window.h
===================================================================
--- uspace/srv/hid/display/types/display/window.h	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/srv/hid/display/types/display/window.h	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -42,4 +42,5 @@
 #include <gfx/context.h>
 #include <gfx/coord.h>
+#include <io/pixel.h>
 #include <io/pixelmap.h>
 
@@ -115,4 +116,8 @@
 	/** Bounding rectangle */
 	gfx_rect_t rect;
+	/** Bitmap flags */
+	gfx_bitmap_flags_t flags;
+	/** Key color */
+	pixel_t key_color;
 } ds_window_bitmap_t;
 
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/srv/hid/display/window.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -131,23 +131,25 @@
 {
 	ds_window_t *wnd = (ds_window_t *) arg;
-	ds_window_bitmap_t *cbm = NULL;
+	ds_window_bitmap_t *wbm = NULL;
 	errno_t rc;
 
-	cbm = calloc(1, sizeof(ds_window_bitmap_t));
-	if (cbm == NULL)
+	wbm = calloc(1, sizeof(ds_window_bitmap_t));
+	if (wbm == NULL)
 		return ENOMEM;
 
 	rc = gfx_bitmap_create(ds_display_get_gc(wnd->display), params, alloc,
-	    &cbm->bitmap);
+	    &wbm->bitmap);
 	if (rc != EOK)
 		goto error;
 
-	cbm->wnd = wnd;
-	cbm->rect = params->rect;
-	*rbm = (void *)cbm;
+	wbm->wnd = wnd;
+	wbm->rect = params->rect;
+	wbm->flags = params->flags;
+	wbm->key_color = params->key_color;
+	*rbm = (void *)wbm;
 	return EOK;
 error:
-	if (cbm != NULL)
-		free(cbm);
+	if (wbm != NULL)
+		free(wbm);
 	return rc;
 }
@@ -160,8 +162,8 @@
 static errno_t ds_window_bitmap_destroy(void *bm)
 {
-	ds_window_bitmap_t *cbm = (ds_window_bitmap_t *)bm;
-
-	gfx_bitmap_destroy(cbm->bitmap);
-	free(cbm);
+	ds_window_bitmap_t *wbm = (ds_window_bitmap_t *)bm;
+
+	gfx_bitmap_destroy(wbm->bitmap);
+	free(wbm);
 	return EOK;
 }
@@ -177,5 +179,5 @@
     gfx_coord2_t *offs0)
 {
-	ds_window_bitmap_t *cbm = (ds_window_bitmap_t *)bm;
+	ds_window_bitmap_t *wbm = (ds_window_bitmap_t *)bm;
 	gfx_coord2_t doffs;
 	gfx_coord2_t offs;
@@ -192,8 +194,8 @@
 	if (srect0 != NULL) {
 		/* Clip source rectangle to bitmap rectangle */
-		gfx_rect_clip(srect0, &cbm->rect, &srect);
+		gfx_rect_clip(srect0, &wbm->rect, &srect);
 	} else {
 		/* Source is entire bitmap rectangle */
-		srect = cbm->rect;
+		srect = wbm->rect;
 	}
 
@@ -206,5 +208,5 @@
 
 	/* Transform window rectangle back to bitmap coordinate system */
-	gfx_rect_rtranslate(&offs, &cbm->wnd->rect, &swrect);
+	gfx_rect_rtranslate(&offs, &wbm->wnd->rect, &swrect);
 
 	/* Clip so that transformed rectangle will be inside the window */
@@ -212,31 +214,48 @@
 
 	/* Offset for rendering on screen = window pos + offs */
-	gfx_coord2_add(&cbm->wnd->dpos, &offs, &doffs);
+	gfx_coord2_add(&wbm->wnd->dpos, &offs, &doffs);
 
 	/* Resulting rectangle on the screen we are drawing into */
 	gfx_rect_translate(&doffs, &crect, &drect);
 
-	rc = gfx_bitmap_get_alloc(cbm->bitmap, &alloc);
+	rc = gfx_bitmap_get_alloc(wbm->bitmap, &alloc);
 	if (rc != EOK)
 		return rc;
 
-	pixelmap.width = cbm->rect.p1.x - cbm->rect.p0.x;
-	pixelmap.height = cbm->rect.p1.y - cbm->rect.p0.y;
+	pixelmap.width = wbm->rect.p1.x - wbm->rect.p0.x;
+	pixelmap.height = wbm->rect.p1.y - wbm->rect.p0.y;
 	pixelmap.data = alloc.pixels;
 
 	/* Render a copy to the backbuffer */
-	for (y = crect.p0.y; y < crect.p1.y; y++) {
-		for (x = crect.p0.x; x < crect.p1.x; x++) {
-			pixel = pixelmap_get_pixel(&pixelmap,
-			    x - cbm->rect.p0.x, y - cbm->rect.p0.y);
-			pixelmap_put_pixel(&cbm->wnd->pixelmap,
-			    x + offs.x - cbm->rect.p0.x + cbm->wnd->rect.p0.x,
-			    y + offs.y - cbm->rect.p0.y + cbm->wnd->rect.p0.y,
-			    pixel);
+	if ((wbm->flags & bmpf_color_key) == 0) {
+		for (y = crect.p0.y; y < crect.p1.y; y++) {
+			for (x = crect.p0.x; x < crect.p1.x; x++) {
+				pixel = pixelmap_get_pixel(&pixelmap,
+				    x - wbm->rect.p0.x, y - wbm->rect.p0.y);
+				pixelmap_put_pixel(&wbm->wnd->pixelmap,
+				    x + offs.x - wbm->rect.p0.x + wbm->wnd->rect.p0.x,
+				    y + offs.y - wbm->rect.p0.y + wbm->wnd->rect.p0.y,
+				    pixel);
+			}
 		}
+	} else {
+		for (y = crect.p0.y; y < crect.p1.y; y++) {
+			for (x = crect.p0.x; x < crect.p1.x; x++) {
+				pixel = pixelmap_get_pixel(&pixelmap,
+				    x - wbm->rect.p0.x, y - wbm->rect.p0.y);
+				if (pixel != wbm->key_color) {
+					pixelmap_put_pixel(&wbm->wnd->pixelmap,
+					    x + offs.x - wbm->rect.p0.x +
+					    wbm->wnd->rect.p0.x,
+					    y + offs.y - wbm->rect.p0.y +
+					    wbm->wnd->rect.p0.y,
+					    pixel);
+				}
+			}
+		}
 	}
 
 	/* Repaint this area of the display */
-	return ds_display_paint(cbm->wnd->display, &drect);
+	return ds_display_paint(wbm->wnd->display, &drect);
 }
 
@@ -249,7 +268,7 @@
 static errno_t ds_window_bitmap_get_alloc(void *bm, gfx_bitmap_alloc_t *alloc)
 {
-	ds_window_bitmap_t *cbm = (ds_window_bitmap_t *)bm;
-
-	return gfx_bitmap_get_alloc(cbm->bitmap, alloc);
+	ds_window_bitmap_t *wbm = (ds_window_bitmap_t *)bm;
+
+	return gfx_bitmap_get_alloc(wbm->bitmap, alloc);
 }
 
Index: uspace/srv/hid/rfb/main.c
===================================================================
--- uspace/srv/hid/rfb/main.c	(revision ef20a917439e3fb80fa2d934420758e5a2f2427d)
+++ uspace/srv/hid/rfb/main.c	(revision bea947f408d47e1cbc0f0bf0321d45f2f00ad11a)
@@ -72,4 +72,6 @@
 	gfx_bitmap_alloc_t alloc;
 	gfx_rect_t rect;
+	gfx_bitmap_flags_t flags;
+	pixel_t key_color;
 	bool myalloc;
 } rfb_bitmap_t;
@@ -199,4 +201,6 @@
 	gfx_coord2_subtract(&params->rect.p1, &params->rect.p0, &dim);
 	rfbbm->rect = params->rect;
+	rfbbm->flags = params->flags;
+	rfbbm->key_color = params->key_color;
 
 	if (alloc == NULL) {
@@ -278,9 +282,21 @@
 	pbm.data = rfbbm->alloc.pixels;
 
-	for (y = srect.p0.y; y < srect.p1.y; y++) {
-		for (x = srect.p0.x; x < srect.p1.x; x++) {
-			color = pixelmap_get_pixel(&pbm, x, y);
-			pixelmap_put_pixel(&rfbbm->rfb->rfb.framebuffer,
-			    x + offs.x, y + offs.y, color);
+	if ((rfbbm->flags & bmpf_color_key) == 0) {
+		for (y = srect.p0.y; y < srect.p1.y; y++) {
+			for (x = srect.p0.x; x < srect.p1.x; x++) {
+				color = pixelmap_get_pixel(&pbm, x, y);
+				pixelmap_put_pixel(&rfbbm->rfb->rfb.framebuffer,
+				    x + offs.x, y + offs.y, color);
+			}
+		}
+	} else {
+		for (y = srect.p0.y; y < srect.p1.y; y++) {
+			for (x = srect.p0.x; x < srect.p1.x; x++) {
+				color = pixelmap_get_pixel(&pbm, x, y);
+				if (color != rfbbm->key_color) {
+					pixelmap_put_pixel(&rfbbm->rfb->rfb.framebuffer,
+					    x + offs.x, y + offs.y, color);
+				}
+			}
 		}
 	}
