From ae1de0d884fbe931914e04c7a191b932b7a5904c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 10 Aug 2011 19:28:08 +0200 Subject: slideshow.c: save_image: Fix handling of capital file endings (closes #51) gib_imlib_save_image_with_error_return was used, but it tries to set the Imlib image format by examining the filename to save to. However, it only supports lowercase file endings (as in .jpg) and breaks with others (like .JPG). Since giblib is unmaintained, for now the fix is only used here. --- src/slideshow.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/slideshow.c') diff --git a/src/slideshow.c b/src/slideshow.c index 6d39d2c..0d84c1d 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -472,7 +472,14 @@ void slideshow_save_image(winwidget win) if (!opt.quiet) printf("saving image to filename '%s'\n", tmpname); - gib_imlib_save_image_with_error_return(win->im, tmpname, &err); + /* XXX gib_imlib_save_image_with_error_return breaks with *.XXX and + * similar because it tries to set the image format, which only works + * with .xxx . + * So we leave that part out. + */ + imlib_context_set_image(win->im); + imlib_save_image_with_error_return(tmpname, &err); + if (err) im_weprintf(win, "Can't save image %s:", tmpname); -- cgit v1.2.3