]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 25 Apr 2011 13:48:54 +0000 (13:48 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 25 Apr 2011 13:48:54 +0000 (13:48 +0000)
coders/jbig.c
coders/tiff.c
configure
configure.ac
magick/compress.h
magick/image.h
magick/option.c

index 0ee226ed4ebd5f3c6618b3972fb66834537f2b99..4fc1babedf5e708ccb4f8918a5d15cddd0ba4d3b 100644 (file)
@@ -197,6 +197,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
   */
   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);
index 5dbcd1927efaef4270533ac1d5a7770304077981..22e097f88f1e1fa12f65b8ad64cff488212743c9 100644 (file)
@@ -2550,6 +2550,13 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
         SetQuantumMinIsWhite(quantum_info,MagickTrue);
         break;
       }
+#if defined(COMPRESSION_JBIG)
+      case JBIG1Compression:
+      {
+        compress_tag=COMPRESSION_JBIG;
+        break;
+      }
+#endif
       case JPEGCompression:
       {
         compress_tag=COMPRESSION_JPEG;
index 6dafe1cc784046dc780c0473105c62cc56ce1dc1..b0d39ef193bbe7dfc05043d83f33a64dd1be5e10 100755 (executable)
--- a/configure
+++ b/configure
@@ -835,11 +835,17 @@ OPENMP_CXXFLAGS
 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 "$UINT16_T" >&6; }
 { $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
index 122efde553936d03f611a8f2801689cee2c09402..5eb8058fbfa022c6117b1f339731d03827e11ae6 100755 (executable)
@@ -920,63 +920,97 @@ AC_SUBST(UINT16_T)
 
 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([],
index 41ca4e3fb5bb99899626226f6e89e58abd8a628b..02a20eccba2511a5312d74d7705c9bd9be73b591 100644 (file)
@@ -33,7 +33,7 @@ typedef enum
   FaxCompression,
   Group4Compression,
   JPEGCompression,
-  JPEG2000Compression,
+  JPEG2000Compression,      /* ISO/IEC std 15444-1 */
   LosslessJPEGCompression,
   LZWCompression,
   RLECompression,
@@ -43,7 +43,9 @@ typedef enum
   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
index de495bbe2910e2849b4aa13c03e2dbb2cd8c08c2..96a4822e95e57bbb13c8e866adeecdb9130e2e94 100644 (file)
@@ -338,7 +338,6 @@ struct _Image
     ping;
 };
 
-
 struct _ImageInfo
 {
   CompressionType
index 6eec05c517bd165c26e6af28b5481c48944d27c0..04d723723d6e0c31c8335c0efdd85ee6709ff69d 100644 (file)
@@ -796,6 +796,8 @@ static const OptionInfo
     { "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 },