From f8984fc5030b45e84ee3f6cc9b82402315ba6bd3 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 14 Dec 2009 10:27:15 +0100 Subject: [PATCH] image: load with image Signed-off-by: Julien Danjou --- image.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/image.c b/image.c index 603af059..a0367e75 100644 --- a/image.c +++ b/image.c @@ -277,14 +277,15 @@ static int image_new_from_file(const char *filename) { Imlib_Image imimage; + Imlib_Load_Error e = IMLIB_LOAD_ERROR_NONE; image_t *image; if(!filename) return 0; - if(!(imimage = imlib_load_image(filename))) + if(!(imimage = imlib_load_image_with_error_return(filename, &e))) { - warn("cannot load image %s", filename); + warn("cannot load image %s: %s", filename, image_imlib_load_strerror(e)); return 0; }