Re: TIFF compression support list
frechefuchs via Graphicsmagick-help <[email protected]> Thu, 28 Sep 2023 18:02:39 +0200
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
With the following patch, the build completed. And compression support
list doesn't mention LZW anymore:
> ./rungm.sh ./utilities/gm convert -list formats | grep -A1 " TIFF P"
> TIFF P rw+ Tagged Image File Format (LIBTIFF, Version 4.1.0)
> Supported Compressions: None, Fax/Group3, Group4, JBIG, JPEG, LZMA, RLE, ZIP, ZSTD, WEBP
Still WEBP compression support is indicated, even though libwebp-dev is
not installed.
Best,
fux
diff -r d97320e45918 coders/tiff.c
--- a/coders/tiff.c Sat Sep 23 16:13:36 2023 -0500
+++ b/coders/tiff.c Thu Sep 28 18:00:06 2023 +0200
@@ -63,6 +63,7 @@
# endif
# include "tiff.h"
# include "tiffio.h"
+# undef COMPRESSION_LZW
# if !defined(COMPRESSION_ADOBE_DEFLATE)
# define COMPRESSION_ADOBE_DEFLATE 8
# endif /* !defined(COMPRESSION_ADOBE_DEFLATE) */
@@ -653,9 +654,11 @@
result="JBIG";
break;
#endif
+#if defined(COMPRESSION_LZW)
case COMPRESSION_LZW:
result="LZW";
break;
+#endif
#if defined(COMPRESSION_NEXT)
case COMPRESSION_NEXT:
result="NeXT 2-bit RLE";
@@ -2199,9 +2202,11 @@
case COMPRESSION_OJPEG:
image->compression=JPEGCompression;
break;
+#if defined(COMPRESSION_LZW)
case COMPRESSION_LZW:
image->compression=LZWCompression;
break;
+#endif
#if defined(COMPRESSION_LZMA)
case COMPRESSION_LZMA:
image->compression=LZMACompression;
@@ -4746,11 +4751,13 @@
compress_tag=COMPRESSION_JPEG;
break;
}
+#if defined(COMPRESSION_LZW)
case LZWCompression:
{
compress_tag=COMPRESSION_LZW;
break;
}
+#endif
#if defined(COMPRESSION_LZMA)
case LZMACompression:
{
@@ -5541,6 +5548,7 @@
break;
}
#endif /* COMPRESSION_JBIG */
+#if defined(COMPRESSION_LZW)
case COMPRESSION_LZW:
{
/*
@@ -5554,6 +5562,7 @@
predictor=PREDICTOR_HORIZONTAL;
break;
}
+#endif
#if defined(COMPRESSION_ZSTD)
case COMPRESSION_ZSTD:
{