Commit 4e841e7a authored by Thomas White's avatar Thomas White Committed by Thomas White
Browse files

Make PNG and TIFF tests work

parent e5c2085d
......@@ -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
......
......@@ -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
......
......@@ -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])
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment