diff options
Diffstat (limited to 'w3mimg/x11/x11_w3mimg.c')
-rw-r--r-- | w3mimg/x11/x11_w3mimg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c index ac21f6b..9a539de 100644 --- a/w3mimg/x11/x11_w3mimg.c +++ b/w3mimg/x11/x11_w3mimg.c @@ -423,6 +423,10 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h) w = imlib_image_get_width(); if (h <= 0) h = imlib_image_get_height(); + + im = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), w, h); + imlib_context_set_image(im); + img->pixmap = (void *)XCreatePixmap(xi->display, xi->parent, w, h, attr.depth); if (!img->pixmap) @@ -433,7 +437,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h) imlib_context_set_visual(attr.visual); imlib_context_set_colormap(attr.colormap); imlib_context_set_drawable((Drawable) img->pixmap); - imlib_render_image_on_drawable_at_size(0, 0, w, h); + imlib_render_image_on_drawable(0, 0); imlib_free_image(); #elif defined(USE_GDKPIXBUF) max_anim = self->max_anim; |