aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-03-09 11:37:49 +0100
committerBert <ber.t@gmx.com>2011-03-09 11:37:49 +0100
commitd982b06eed04cb080a4dd730b75f93285d5b159b (patch)
tree1be5b16d7ecb6a692603fa3f80bce7134c74412e /image.c
parenta82c45431bd31bfedaad00d77cc2ab4c772774d0 (diff)
downloadnsxiv-d982b06eed04cb080a4dd730b75f93285d5b159b.tar.zst
White background for images with alpha
Diffstat (limited to 'image.c')
-rw-r--r--image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/image.c b/image.c
index c8fab6a..854e50b 100644
--- a/image.c
+++ b/image.c
@@ -210,6 +210,9 @@ void img_render(img_t *img, win_t *win) {
imlib_context_set_image(img->im);
else
imlib_context_set_image(im_broken);
+
+ if (imlib_image_has_alpha())
+ win_draw_rect(win, win->pm, dx, dy, dw, dh, True, 0, win->white);
imlib_context_set_drawable(win->pm);
imlib_render_image_part_on_drawable_at_size(sx, sy, sw, sh, dx, dy, dw, dh);