summaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@gmail.com>2012-12-27 16:43:19 +0100
committerBert Münnich <be.muennich@gmail.com>2012-12-27 16:43:19 +0100
commit97a2c05cc30adb3b90842b671607a05857db63a0 (patch)
treeed1b2759559d11e06ed2d092535217578d6008b7 /image.c
parentcd929eabfeb5344b2f7c43555eea20fc15a7f1ca (diff)
downloadnsxiv-97a2c05cc30adb3b90842b671607a05857db63a0.tar.zst
Fixed issue #74, conditional compilation of gif support
Diffstat (limited to 'image.c')
-rw-r--r--image.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/image.c b/image.c
index d147c1b..6ca2cd3 100644
--- a/image.c
+++ b/image.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
-#include <gif_lib.h>
#include "exif.h"
#include "image.h"
@@ -31,7 +30,10 @@
#include "util.h"
#include "config.h"
+#if HAVE_GIFLIB
+#include <gif_lib.h>
enum { MIN_GIF_DELAY = 25 };
+#endif
float zoom_min;
float zoom_max;
@@ -92,6 +94,7 @@ void exif_auto_orientate(const fileinfo_t *file) {
}
}
+#if HAVE_GIFLIB
bool img_load_gif(img_t *img, const fileinfo_t *file) {
GifFileType *gif;
GifRowType *rows = NULL;
@@ -261,6 +264,7 @@ bool img_load_gif(img_t *img, const fileinfo_t *file) {
return !err;
}
+#endif /* HAVE_GIFLIB */
bool img_load(img_t *img, const fileinfo_t *file) {
const char *fmt;
@@ -284,8 +288,10 @@ bool img_load(img_t *img, const fileinfo_t *file) {
}
if (STREQ(fmt, "jpeg"))
exif_auto_orientate(file);
+#if HAVE_GIFLIB
if (STREQ(fmt, "gif"))
img_load_gif(img, file);
+#endif
img->w = imlib_image_get_width();
img->h = imlib_image_get_height();