diff --git a/coders/jbig.c b/coders/jbig.c
index 0ee226e..4fc1bab 100644
--- a/coders/jbig.c
+++ b/coders/jbig.c
@@ -197,6 +197,7 @@
*/
image->columns=jbg_dec_getwidth(&jbig_info);
image->rows=jbg_dec_getheight(&jbig_info);
+ image->compression=JBIG2Compression;
if (AcquireImageColormap(image,2) == MagickFalse)
{
buffer=(unsigned char *) RelinquishMagickMemory(buffer);
diff --git a/coders/tiff.c b/coders/tiff.c
index 5dbcd19..22e097f 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -2550,6 +2550,13 @@
SetQuantumMinIsWhite(quantum_info,MagickTrue);
break;
}
+#if defined(COMPRESSION_JBIG)
+ case JBIG1Compression:
+ {
+ compress_tag=COMPRESSION_JBIG;
+ break;
+ }
+#endif
case JPEGCompression:
{
compress_tag=COMPRESSION_JPEG;
diff --git a/configure b/configure
index 6dafe1c..b0d39ef 100755
--- a/configure
+++ b/configure
@@ -835,11 +835,17 @@
MATH_LIBS
POW_LIB
LIBOBJS
+UINTPTR_F
UINTPTR_T
+UINTMAX_F
UINTMAX_T
+UINT64_F
UINT64_T
+INT64_F
INT64_T
+UINT32_F
UINT32_T
+INT32_F
INT32_T
UINT16_T
INT16_T
@@ -22867,75 +22873,109 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 32-bit type" >&5
$as_echo_n "checking for signed 32-bit type... " >&6; }
INT32_T='none'
+INT32_F='none'
if test $ac_cv_sizeof_signed_int -eq 4; then
INT32_T='signed int'
+ INT32_F='""'
elif test $ac_cv_sizeof_signed_long -eq 4; then
INT32_T='signed long'
+ INT32_F='"l"'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INT32_T" >&5
$as_echo "$INT32_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 32-bit type" >&5
$as_echo_n "checking for unsigned 32-bit type... " >&6; }
UINT32_T='none'
+UINT32_F='none'
if test $ac_cv_sizeof_unsigned_int -eq 4; then
UINT32_T='unsigned int'
+ UINT32_F='""'
elif test $ac_cv_sizeof_unsigned_long -eq 4; then
UINT32_T='unsigned long'
+ UINT32_F='"l"'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UINT32_T" >&5
$as_echo "$UINT32_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 64-bit type" >&5
$as_echo_n "checking for signed 64-bit type... " >&6; }
INT64_T='none'
+INT64_F='none'
if test $ac_cv_sizeof_signed_long -eq 8; then
INT64_T='signed long'
+ INT64_F='"l"'
elif test $ac_cv_sizeof_signed_long_long -eq 8; then
INT64_T='signed long long'
+ INT64_F='"ll"'
fi
+case "${build_os}" in
+ mingw* )
+ INT64_F='"I64"'
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INT64_T" >&5
$as_echo "$INT64_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 64-bit type" >&5
$as_echo_n "checking for unsigned 64-bit type... " >&6; }
UINT64_T='none'
+UINT64_F='none'
if test $ac_cv_sizeof_unsigned_long -eq 8; then
UINT64_T='unsigned long'
+ UINT64_F='"l"'
elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
UINT64_T='unsigned long long'
+ UINT64_F='"ll"'
fi
+case "${build_os}" in
+ mingw* )
+ UINT64_F='"I64"'
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UINT64_T" >&5
$as_echo "$UINT64_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned maximum type" >&5
$as_echo_n "checking for unsigned maximum type... " >&6; }
UINTMAX_T='none'
+UINTMAX_F='none'
if test "$UINT64_T" != 'none'; then
UINTMAX_T=$UINT64_T
+ UINTMAX_F=$UINT64_F
elif test "$UINT32_T" != 'none'; then
UINTMAX_T=$UINT32_T
+ UINTMAX_F=$UINT32_F
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UINTMAX_T" >&5
$as_echo "$UINTMAX_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer difference type" >&5
$as_echo_n "checking for pointer difference type... " >&6; }
UINTPTR_T='none'
+UINTPTR_F='none'
if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
UINTPTR_T='unsigned long'
+ UINTPTR_F='"l"'
elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
UINTPTR_T='unsigned long long'
+ UINTPTR_F='"ll"'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UINTPTR_T" >&5
$as_echo "$UINTPTR_T" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5
$as_echo_n "checking whether our compiler supports __func__... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/configure.ac b/configure.ac
index 122efde..5eb8058 100755
--- a/configure.ac
+++ b/configure.ac
@@ -920,63 +920,97 @@
AC_MSG_CHECKING(for signed 32-bit type)
INT32_T='none'
+INT32_F='none'
if test $ac_cv_sizeof_signed_int -eq 4; then
INT32_T='signed int'
+ INT32_F='""'
elif test $ac_cv_sizeof_signed_long -eq 4; then
INT32_T='signed long'
+ INT32_F='"l"'
fi
AC_MSG_RESULT($INT32_T)
AC_SUBST(INT32_T)
+AC_SUBST(INT32_F)
AC_MSG_CHECKING(for unsigned 32-bit type)
UINT32_T='none'
+UINT32_F='none'
if test $ac_cv_sizeof_unsigned_int -eq 4; then
UINT32_T='unsigned int'
+ UINT32_F='""'
elif test $ac_cv_sizeof_unsigned_long -eq 4; then
UINT32_T='unsigned long'
+ UINT32_F='"l"'
fi
AC_MSG_RESULT($UINT32_T)
AC_SUBST(UINT32_T)
+AC_SUBST(UINT32_F)
AC_MSG_CHECKING(for signed 64-bit type)
INT64_T='none'
+INT64_F='none'
if test $ac_cv_sizeof_signed_long -eq 8; then
INT64_T='signed long'
+ INT64_F='"l"'
elif test $ac_cv_sizeof_signed_long_long -eq 8; then
INT64_T='signed long long'
+ INT64_F='"ll"'
fi
+case "${build_os}" in
+ mingw* )
+ INT64_F='"I64"'
+ ;;
+esac
AC_MSG_RESULT($INT64_T)
AC_SUBST(INT64_T)
+AC_SUBST(INT64_F)
AC_MSG_CHECKING(for unsigned 64-bit type)
UINT64_T='none'
+UINT64_F='none'
if test $ac_cv_sizeof_unsigned_long -eq 8; then
UINT64_T='unsigned long'
+ UINT64_F='"l"'
elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
UINT64_T='unsigned long long'
+ UINT64_F='"ll"'
fi
+case "${build_os}" in
+ mingw* )
+ UINT64_F='"I64"'
+ ;;
+esac
AC_MSG_RESULT($UINT64_T)
AC_SUBST(UINT64_T)
+AC_SUBST(UINT64_F)
AC_MSG_CHECKING(for unsigned maximum type)
UINTMAX_T='none'
+UINTMAX_F='none'
if test "$UINT64_T" != 'none'; then
UINTMAX_T=$UINT64_T
+ UINTMAX_F=$UINT64_F
elif test "$UINT32_T" != 'none'; then
UINTMAX_T=$UINT32_T
+ UINTMAX_F=$UINT32_F
fi
AC_MSG_RESULT($UINTMAX_T)
AC_SUBST(UINTMAX_T)
+AC_SUBST(UINTMAX_F)
AC_MSG_CHECKING(for pointer difference type)
UINTPTR_T='none'
+UINTPTR_F='none'
if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
UINTPTR_T='unsigned long'
+ UINTPTR_F='"l"'
elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
UINTPTR_T='unsigned long long'
+ UINTPTR_F='"ll"'
fi
AC_MSG_RESULT($UINTPTR_T)
AC_SUBST(UINTPTR_T)
+AC_SUBST(UINTPTR_F)
AC_MSG_CHECKING([whether our compiler supports __func__])
AC_TRY_COMPILE([],
diff --git a/magick/compress.h b/magick/compress.h
index 41ca4e3..02a20ec 100644
--- a/magick/compress.h
+++ b/magick/compress.h
@@ -33,7 +33,7 @@
FaxCompression,
Group4Compression,
JPEGCompression,
- JPEG2000Compression,
+ JPEG2000Compression, /* ISO/IEC std 15444-1 */
LosslessJPEGCompression,
LZWCompression,
RLECompression,
@@ -43,7 +43,9 @@
Pxr24Compression,
B44Compression,
B44ACompression,
- LZMACompression
+ LZMACompression, /* Lempel-Ziv-Markov chain algorithm */
+ JBIG1Compression, /* ISO/IEC std 11544 / ITU-T rec T.82 */
+ JBIG2Compression /* ISO/IEC std 14492 / ITU-T rec T.88 */
} CompressionType;
typedef struct _Ascii85Info
diff --git a/magick/image.h b/magick/image.h
index de495bb..96a4822 100644
--- a/magick/image.h
+++ b/magick/image.h
@@ -338,7 +338,6 @@
ping;
};
-
struct _ImageInfo
{
CompressionType
diff --git a/magick/option.c b/magick/option.c
index 6eec05c..04d7237 100644
--- a/magick/option.c
+++ b/magick/option.c
@@ -796,6 +796,8 @@
{ "DXT5", DXT5Compression, UndefinedOptionFlag, MagickFalse },
{ "Fax", FaxCompression, UndefinedOptionFlag, MagickFalse },
{ "Group4", Group4Compression, UndefinedOptionFlag, MagickFalse },
+ { "JBIG1", JBIG1Compression, UndefinedOptionFlag, MagickFalse },
+ { "JBIG2", JBIG2Compression, UndefinedOptionFlag, MagickFalse },
{ "JPEG", JPEGCompression, UndefinedOptionFlag, MagickFalse },
{ "JPEG2000", JPEG2000Compression, UndefinedOptionFlag, MagickFalse },
{ "Lossless", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },