diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-04-07 12:21:01 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-04-07 12:21:01 +0200 |
commit | 13f16feb81a8fd2510a406138971bd9a5db192b0 (patch) | |
tree | 61c31f006bcf35de843f2673c2b82c9d97581fc8 /src/imlib.c | |
parent | b59da43c99019232ae9f7b7e67d722b38f43b24c (diff) |
fix gib_imlib_save_image_with_error_return in imported giblib code
Diffstat (limited to 'src/imlib.c')
-rw-r--r-- | src/imlib.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/imlib.c b/src/imlib.c index b3bf04b..10ab718 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -148,32 +148,6 @@ int feh_load_image_char(Imlib_Image * im, char *filename) return(i); } -/* - * XXX gib_imlib_save_image_with_error_return breaks with *.END and - * similar because it tries to set the image format, which only works - * with .end . - * So we leave that part out. - */ -void ungib_imlib_save_image_with_error_return(Imlib_Image im, char *file, - Imlib_Load_Error * error_return) -{ - char *tmp; - imlib_context_set_image(im); - tmp = strrchr(file, '.'); - if (tmp) { - char *p, *pp; - p = estrdup(tmp + 1); - pp = p; - while(*pp) { - *pp = tolower(*pp); - pp++; - } - imlib_image_set_format(p); - free(p); - } - imlib_save_image_with_error_return(file, error_return); -} - void feh_imlib_print_load_error(char *file, winwidget w, Imlib_Load_Error err) { if (err == IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS) @@ -1055,7 +1029,7 @@ void feh_edit_inplace(winwidget w, int op) imlib_image_flip_horizontal(); } else gib_imlib_image_orientate(old, op); - ungib_imlib_save_image_with_error_return(old, + gib_imlib_save_image_with_error_return(old, FEH_FILE(w->file->data)->filename, &err); gib_imlib_free_image(old); if (err) |