Page 1 of 1

GIF LZW Decompression

Posted: 2010-07-25T08:38:18-07:00
by madankn79
Hi All,

Am desperately looking for GIF Image De compressor. Can anyone please help me decompressing Giff images compressed with lzw.

* Will ImageMagick convert gif images with lzw conversion to uncompressed gif image.
* If ImageMagick cannot help me, then can anyone let me know any other tool/library which can do this.

Thanks In Advance.
Mady

Re: GIF LZW Decompression

Posted: 2010-07-25T14:02:20-07:00
by fmw42
Post a link to an example GIF that you want to convert, so we can test it.

Also see non-IM tools at http://www.imagemagick.org/Usage/formats/#gif_non-im

Re: GIF LZW Decompression

Posted: 2011-11-18T20:05:25-07:00
by Ragnar0k
Hello,
Just to bump this issue - I am in the same position as madankn79...
I am converting a tiff to a gif, the command would be
convert +compress <file.tif> <file.gif>
+compress however does not work, and neither does -compress None. gif files will always be produced with an LZW compression:

$ convert +compress ucid00182.tif test.gif
$ identify -verbose test.gif | grep -i compre
Compression: LZW

Please help...
I am using debian wheezy:
imagemagick 8:6.6.9.7-5+b1

Thank you in advance!!

Re: GIF LZW Decompression

Posted: 2011-11-19T06:11:51-07:00
by glennrp
If you just need the uncompressed image, why not convert it to PPM which is
a simple uncompressed format? If the output must be GIF but uncompressed
for some reason, there is libungif. Note that there is no longer any patent issue
about LZW which was the motivation for writing libungif about 1995.

See http://directory.fsf.org/wiki/Libungif

Re: GIF LZW Decompression

Posted: 2011-11-19T12:27:03-07:00
by Ragnar0k
thank you for your feedback!
I really needed the uncompressed gif for some statistical work (and the work must be done on a gif only unfortunately). libungif tools don't seem to have any straight forward conversion between tiff and gif (tried tiff->rgb->gif but didn't work properly).
I guess I must write something myself (doh!)

Re: GIF LZW Decompression

Posted: 2011-11-19T12:46:08-07:00
by fmw42
Did you try putting +compress after the input image is read in. See http://www.imagemagick.org/Usage/basics/#why

convert ucid00182.tif +compress test.gif

or


convert ucid00182.tif -compress none test.gif

Re: GIF LZW Decompression

Posted: 2011-11-19T13:38:26-07:00
by Ragnar0k
Same result unfortunately...

Re: GIF LZW Decompression

Posted: 2011-11-19T13:49:43-07:00
by fmw42
Ragnar0k wrote:Same result unfortunately...
Yes, I tried the same thing on some test images and got the same result -- cannot get rid of LZW

see non-im solutions at http://www.imagemagick.org/Usage/formats/#gif_non-im

Re: GIF LZW Decompression

Posted: 2011-11-19T14:07:35-07:00
by magick
ImageMagick supported uncompressed GIF but we removed support when the LZW compression patent expired world-wide.

Re: GIF LZW Decompression

Posted: 2011-11-20T04:22:49-07:00
by glennrp
ImageMagick-5.5.7 is still available at SourceForge and I believe it supports uncompressed GIF.