aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-12-08 16:18:37 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:08 +0100
commit4e841e7a8592ca406235ecf181245dba0b0c5e30 (patch)
tree1da15eaa11564e4198fed623d067c896752801b6
parente5c2085dafa95f7d9f82fe4a8bb79012cb0f3166 (diff)
Make PNG and TIFF tests work
-rw-r--r--config.h.in6
-rwxr-xr-xconfigure9
-rw-r--r--configure.ac6
-rw-r--r--src/render.c4
4 files changed, 21 insertions, 4 deletions
diff --git a/config.h.in b/config.h.in
index bfb065a4..a1c63a32 100644
--- a/config.h.in
+++ b/config.h.in
@@ -41,6 +41,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if libPNG is available */
+#undef HAVE_LIBPNG
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
@@ -142,6 +145,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if libTIFF is available */
+#undef HAVE_TIFF
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/configure b/configure
index 38d96fc4..7d1dd6b4 100755
--- a/configure
+++ b/configure
@@ -6626,7 +6626,11 @@ else
libPNG_LIBS=$pkg_cv_libPNG_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- havelibpng=true
+
+
+$as_echo "#define HAVE_LIBPNG 1" >>confdefs.h
+
+
fi
else
@@ -6658,6 +6662,9 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define HAVE_TIFF 1" >>confdefs.h
+
+
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
diff --git a/configure.ac b/configure.ac
index 2a58233a..07572696 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,10 @@ AC_ARG_ENABLE([png],
AS_IF([test "x$enable_png" != "xno"],
[
AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES([libPNG], [libpng >= 1.2.0], [havelibpng=true])
+ PKG_CHECK_MODULES([libPNG], [libpng >= 1.2.0],
+ [
+ AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
+ ])
],[
AC_MSG_RESULT([no])
])
@@ -117,6 +120,7 @@ AS_IF([test "x$enable_tiff" != "xno"],
LIBTIFF_LIBS="-L$withval/lib -ltiff"],
[LIBTIFF_LIBS="-ltiff"])
AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_TIFF], [1], [Define to 1 if libTIFF is available])
],
[
AC_MSG_RESULT([no])
diff --git a/src/render.c b/src/render.c
index 98fb693d..0051780d 100644
--- a/src/render.c
+++ b/src/render.c
@@ -465,7 +465,7 @@ int render_tiff_fp(DisplayWindow *dw, const char *filename)
if ( image == NULL ) return 1;
image->features = NULL;
image->data = NULL;
- hdf5_read(dw->hdfile, image, 1);
+ hdf5_read(dw->hdfile, image, 1, 0.0);
if ( dw->cmfilter ) filter_cm(image);
if ( dw->noisefilter ) filter_noise(image, NULL);
@@ -514,7 +514,7 @@ int render_tiff_int16(DisplayWindow *dw, const char *filename)
if ( image == NULL ) return 1;
image->features = NULL;
image->data = NULL;
- hdf5_read(dw->hdfile, image, 1);
+ hdf5_read(dw->hdfile, image, 1, 0.0);
if ( dw->cmfilter ) filter_cm(image);
if ( dw->noisefilter ) filter_noise(image, NULL);