diff options
Diffstat (limited to 'src/gib_imlib.c')
-rw-r--r-- | src/gib_imlib.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gib_imlib.c b/src/gib_imlib.c index b53b1cc..8f401aa 100644 --- a/src/gib_imlib.c +++ b/src/gib_imlib.c @@ -527,13 +527,22 @@ void gib_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) - imlib_image_set_format(tmp + 1); - imlib_save_image_with_error_return(file, 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 |