aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-07-05 16:33:49 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:52 +0100
commit7135bb83dacf088e6613149453a9e51dd005a730 (patch)
treea588a7146cb0ba7dd637a1ee4e990cea9e682ffa /src/render.c
parentd12550ca258bc9c7dbe7d887ed81949e406d5aef (diff)
Test for libPNG
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/render.c b/src/render.c
index 9546f5cd..72d0d8f0 100644
--- a/src/render.c
+++ b/src/render.c
@@ -24,6 +24,7 @@
#include "render.h"
#include "peaks.h"
#include "filters.h"
+#include "utils.h"
static void *render_bin(float *in, int inw, int inh, int binning, float *maxp)
@@ -361,6 +362,7 @@ GdkPixbuf *render_get_colour_scale(size_t w, size_t h, int scale)
int render_png(DisplayWindow *dw, const char *filename)
{
+#ifdef HAVE_LIBPNG
FILE *fh;
png_structp png_ptr;
png_infop info_ptr;
@@ -465,7 +467,9 @@ int render_png(DisplayWindow *dw, const char *filename)
fclose(fh);
free(hdr);
-
+#else
+ STATUS("No PNG support.\n");
+#endif
return 0;
}