Re: TIFF compression support list
Bob Friesenhahn <[email protected]> Thu, 28 Sep 2023 13:23:21 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 28 Sep 2023, frechefuchs via Graphicsmagick-help wrote:
>
> Hm, either I did something stupid or that doesn't work. With the
> attached patch, the build indicates LZW support, and I am able to create
> an LZW compressed image. At least tiffdump shows a compression tag 5
> and file size is between RLE and Zip compression.
>
> What is the expected result of requesting a non-existent compression type?
I seem to be continually providing bad advice. ;-(
So now that I am editing files, and actually testing, I see a better
way, and you should like it quite a lot more, except that it won't
remove LZW from the claimed compression algorithms.
Around line 419, you should find a function called
CompressionSupported(). For "case LZWCompression" do this:
case LZWCompression:
{
#if 0
strlcpy(compression_name,"LZW",MaxTextExtent);
#if defined(COMPRESSION_LZW)
compress_tag=COMPRESSION_LZW;
status=MagickTrue;
#endif
#endif
break;
It seems that I assumed that many compressors (especially those
provided directly by libtiff) are always available.
Test the result like this:
./rungm.sh ./utilities/gm convert logo: -compress lzw -debug coder crap.tiff
The above will also show traces describing what it is doing.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt