Page 1 of 1

TIFF compression - LZW vs. ZIP

Posted: June 29th, 2013, 5:56 am
by tomczak
I'm trying to compress a bunch of 48bit TIFF images in my library to save space. I noticed that not only ZIP-compressed TIFFs are smaller than their LZW counterparts but also saving (compressing) ZIPped TIFF is way faster. Seems like no-brainer: zip them.

But I just noticed a problem: while TIFF-LZW open fine in PWP (and some other programs I've checked, such as NeatImage), which tells me that everything is fine with the PWP implementation, they produce gibberish when opened in FastStone Viewer. Would anybody have now any thing more about the issue?

BTW: is my observation as to the ZIP vs. LZW compression consistent with with what others have seen (i.e. that ZIP is both faster and more compact than LZW)? Are there any advantages of LZW that I haven't considered?

Cheers!

Re: TIFF compression - LZW vs. ZIP

Posted: June 29th, 2013, 11:07 am
by MarkT
Hi Maciej,

In my test, the TIFF-LZW appeared fine but the TIFF-ZIP image displayed as pure black in Faststone 4.8; both TIFF-ZIP and TIFF-LZW failed to open in Nikon Capture NX 2.4.3; and Gimp 2.8.4 opened both the ZIP and LZW files, but only in 8-bit.

I can confirm that the time to save and file sizes match with your examples - ZIP is much faster and smaller. (In my example: TIFF = 74.5 MB; TIFF-ZIP = 53.7 MB; TIFF-LZW = 64.1 MB).

In my experience I convert raw files to TIFF 48-bit, do all the editing required, then save the final version as a best quality JPEG. I don't see the need to keep the larger TIFF files around, as printers and most of my clients can't handle the 48-bit files anyway.

Curious to see what else we can learn about the compression differences, though. I thought TIFF variants would be ubiquitous across most image editors.

Re: TIFF compression - LZW vs. ZIP

Posted: June 29th, 2013, 11:42 am
by jsachs
I just tested and both 48-bit TIFF LZW and 48-bit TIFF ZIP files written by PWP open correctly in Photoshop CS6.

ZIP does seem to be better overall, but support of LZW is more widespread. LZW is very good if you have large blocks of solid color.

Re: TIFF compression - LZW vs. ZIP

Posted: June 30th, 2013, 12:30 am
by tomczak
In the Manual, Ch.16 (Utility Functions), p. 440, under 'TIFF' heading, there is a mention of an LZW compression option in Preferences. I don't seem to be able to find it.

Re: TIFF compression - LZW vs. ZIP

Posted: June 30th, 2013, 10:00 am
by ksinkel
I believe that the documentation refers to a feature that has been removed -- at one time there was an option to zero a selected number of least-significant bits to improve compression ratios of 16 bit images.

Kiril