summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-08-10 19:28:08 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-08-10 19:28:08 +0200
commitae1de0d884fbe931914e04c7a191b932b7a5904c (patch)
treebef0c6482fa8263d3af9debb4354db966c879823
parent70c2ff5cc9f378300cd20492534841bfe04f5be5 (diff)
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.
-rw-r--r--AUTHORS4
-rw-r--r--ChangeLog2
-rw-r--r--src/slideshow.c9
3 files changed, 13 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index da0785c..c0c1c09 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -44,6 +44,9 @@ JC <jcm314@yahoo.com>
Ulrich Spoerlein <q@uni.de>
- fullscreen image count display
+Yu-Jie Lin
+ - Various patches
+
Daniel Friesel <derf@finalrewind.org>
- Maintenance since 2010
@@ -58,4 +61,3 @@ The Rasterman <raster@rasterman.com>
- Imlib2, initial zooming code example. Enlightenment.
Stephen Levine
- Great help debugging under E17
-
diff --git a/ChangeLog b/ChangeLog
index f55edc5..5dabcd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@ git HEAD
<https://github.com/derf/feh/issues/30>
* New actions: lossless flip (key _) and mirror (key |)
<https://github.com/derf/feh/issues/53>
+ * Fix save_image key for *.JPG and similar filenames
+ <https://github.com/derf/feh/issues/51>
Mon, 04 Jul 2011 14:46:36 +0200 Daniel Friesel <derf@finalrewind.org>
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);