summaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-03-01 18:49:02 +0100
committerBert <ber.t@gmx.com>2011-03-01 18:49:02 +0100
commitc05fd44bdda2934fa6f2f83b776038659f9d7d71 (patch)
tree9580d1edc2168c185a88943b430bef1d814077f7 /image.c
parent955c39a5c5e3193e18c21abe87110651cc2472d2 (diff)
downloadnsxiv-c05fd44bdda2934fa6f2f83b776038659f9d7d71.tar.zst
Support for external commands like mogrify & jpegtran
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;
}
}