From 13f16feb81a8fd2510a406138971bd9a5db192b0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 7 Apr 2015 12:21:01 +0200 Subject: fix gib_imlib_save_image_with_error_return in imported giblib code --- src/imlib.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/imlib.c') 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) -- cgit v1.2.3