From c05fd44bdda2934fa6f2f83b776038659f9d7d71 Mon Sep 17 00:00:00 2001 From: Bert Date: Tue, 1 Mar 2011 18:49:02 +0100 Subject: Support for external commands like mogrify & jpegtran --- image.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index 5a69c20..c8fab6a 100644 --- a/image.c +++ b/image.c @@ -99,10 +99,13 @@ int img_load(img_t *img, const char *filename) { return 1; } -void img_close(img_t *img) { +void img_close(img_t *img, int decache) { if (img && img->im) { imlib_context_set_image(img->im); - imlib_free_image(); + if (decache) + imlib_free_image_and_decache(); + else + imlib_free_image(); img->im = NULL; } } -- cgit v1.2.3