aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'image.c')
-rw-r--r--image.c7
1 files changed, 5 insertions, 2 deletions
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;
}
}