summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-09-08 15:55:03 +0200
committerBert <ber.t@gmx.com>2011-09-08 15:58:30 +0200
commitfdbc5cf76b547e60395027e60011d9f301bbb776 (patch)
treefce5f56575f7d0eb7484d620158a4c6289acc8cd /thumbs.c
parentbfab4dc328f580cc21c31ee3e4f53e1b8ca7c4ab (diff)
downloadnsxiv-fdbc5cf76b547e60395027e60011d9f301bbb776.tar.zst
Added EXIF_SUPPORT macro for optional dependency on libexif
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/thumbs.c b/thumbs.c
index cede997..63f08d3 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -34,7 +34,9 @@
#define st_atim st_atimespec
#endif
+#ifdef EXIF_SUPPORT
void exif_auto_orientate(const fileinfo_t*);
+#endif
const int thumb_dim = THUMB_SIZE + 10;
char *cache_dir = NULL;
@@ -255,11 +257,14 @@ int tns_load(tns_t *tns, int n, const fileinfo_t *file,
imlib_context_set_image(im);
imlib_context_set_anti_alias(1);
- if (!cache_hit) {
- fmt = imlib_image_format();
- if (!strcmp(fmt, "jpeg"))
- exif_auto_orientate(file);
- }
+ fmt = imlib_image_format();
+ /* avoid unused-but-set-variable warning */
+ (void) fmt;
+
+#ifdef EXIF_SUPPORT
+ if (!cache_hit !strcmp(fmt, "jpeg"))
+ exif_auto_orientate(file);
+#endif
w = imlib_image_get_width();
h = imlib_image_get_height();