* {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c}

(JBIGDecode): jbg_newlen is not available in older JBIG-KIT and
its use does not appear to be required, so use it only when it is
available.
This commit is contained in:
Bob Friesenhahn 2006-07-04 19:01:47 +00:00
parent 1398c14781
commit 33bf9a3f4c
5 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2006-07-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c}
(JBIGDecode): jbg_newlen is not available in older JBIG-KIT and
its use does not appear to be required, so use it only when it is
available.
2006-06-24 Andrey Kiselev <dron@ak4719.spb.edu> 2006-06-24 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961). * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).

View File

@ -451,6 +451,9 @@ if test "$HAVE_JBIG" = "yes" ; then
LIBDIR="-R $with_jbig_lib_dir $LIBDIR" LIBDIR="-R $with_jbig_lib_dir $LIBDIR"
fi fi
# Older versions of jbigkit lack jbg_newlen
AC_CHECK_FUNCS([jbg_newlen])
fi fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------

View File

@ -55,6 +55,9 @@
/* Define to 1 if you have the `isascii' function. */ /* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII #undef HAVE_ISASCII
/* Define to 1 if you have the `jbg_newlen' function. */
#undef HAVE_JBG_NEWLEN
/* Define to 1 if you have the `lfind' function. */ /* Define to 1 if you have the `lfind' function. */
#undef HAVE_LFIND #undef HAVE_LFIND

View File

@ -8,6 +8,9 @@
machine */ machine */
#define HAVE_IEEEFP 1 #define HAVE_IEEEFP 1
/* Define to 1 if you have the `jbg_newlen' function. */
#define HAVE_JBG_NEWLEN 1
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1

View File

@ -1,4 +1,4 @@
/* $Id: tif_jbig.c,v 1.1 2006-06-07 15:39:03 dron Exp $ */ /* $Id: tif_jbig.c,v 1.2 2006-07-04 19:01:47 bfriesen Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -88,6 +88,8 @@ static int JBIGDecode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_t s)
} }
jbg_dec_init(&decoder); jbg_dec_init(&decoder);
#if defined(HAVE_JBG_NEWLEN)
jbg_newlen(tif->tif_rawdata, tif->tif_rawdatasize); jbg_newlen(tif->tif_rawdata, tif->tif_rawdatasize);
/* /*
* I do not check the return status of jbg_newlen because even if this * I do not check the return status of jbg_newlen because even if this
@ -99,6 +101,7 @@ static int JBIGDecode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_t s)
* PostScript. As long as the actual image length is contained in the * PostScript. As long as the actual image length is contained in the
* BIE header jbg_dec_in should succeed. * BIE header jbg_dec_in should succeed.
*/ */
#endif /* HAVE_JBG_NEWLEN */
decodeStatus = jbg_dec_in(&decoder, tif->tif_rawdata, decodeStatus = jbg_dec_in(&decoder, tif->tif_rawdata,
tif->tif_rawdatasize, NULL); tif->tif_rawdatasize, NULL);