Jump to content

Filesize differences in compressed Tifs


Recommended Posts

I wanted to recommend the latest version of the freeware IrfanView

(3.92) to someone who was looking for an economical (i.e. free) way to

batch-compress some large Tif files. Out of curiosity I took the same

uncompressed Tif file and applied both LZW-Tif and Zip-Tif compression

using the "Save As" dialog in both Photoshop/CS and IrfanView 3.92. To

my surprise, the compressed files in Irfanview were larger than the

compressed files in Photoshop, even though both compression methods

are lossless AND each compressed file could be re-opened in either

PS/CS or IrfanView!

 

Specifically, I started with a smallish 9235KB uncompressed Tif file

(no layers, no channels), with lots of detail in the image. Photoshop

produced a 5988KB LZW-Tif and a 5415KB Zip-Tif. Irfanview produced a

8063KB LZW-Tif and a 6388KB ZIP-Tif.

 

Yeah, I know, you get what you pay for. But does anyone have any idea

why this discrepancy exists, or how I can get the freeware IrfanView

to produce more compact (but still lossless) Tif files?

Link to comment
Share on other sites

Back in the days when zip and similar compression schemes became popular there was always a tradeoff between zipping it fast or zipping it small. The point is that even though the same conpression algorithim is being used how that algorithim is implemented still affects how much compression occurs. What you have dixcovered is that the compression software in PS is more sophisticated than that in IrfanView. Given that one is developed by a major corporation with lots of resources and the other by an individual with limited resources this should not be suprising. If you want IrfanView to compress better find a compression software hotshot who is willing to give the IrvanView some free consultation.
Link to comment
Share on other sites

I don't remember how LZW differed from the LZ78 description, but the dictionary size might vary. Zip is based on the LZ77 paper and typical implementations many different strengths of compression, with less compression being faster to process. If you want good compression with a fairly clean format, try PNG, you will get better compression than with TIFF (provided that the implementation isn't very bad...)
Link to comment
Share on other sites

I didn't see anything in irfan view that inspired confidence in me, the compression algorithms were just the most obvious. It seemed more egoware than actually delivering on its promises. That is the 'look at what I can do' factor. Buyer be ware.

 

It depends on how they implemented the algorithms. They could have written the code, or obtained it from a thrid party, but it seems unlikely that it was an industrial source. And, just because the files are readable by photoshop doesn't mean that all photo editors can read them or that they will work in future releases.

 

My day job is programming, and you would be surprised how and where the most innocent of mistakes show up. We all make them, but who knows how many from someone you don't know. I would rather put stock in a software suite that has gone through rigorous testing by real world users, than put my photos at risk.

Link to comment
Share on other sites

Just a thought, it is a bit CPU intensive, but lossless JPEG 2000 should get your image down below the 4 MB mark. If you really need to save space, then that is the way to go. For those without CS, you can pick up a <a href=http://www.fnordware.com/j2k/>freeware implementation from Fnord</a>. A quick test on a 16-bit color image (12 bpp source) drops the size from 28.8 MB down to 17 MB. And the same image converted to 8 bit color converts from 14.4 MB down to 4469 KB. So efficiency is still better in a worse case scenario for that image and the compression is still lossless.<p>

 

some thoughts,<p>

 

Sean <p>

 

<a href=http://www.tearnet.com/sean>http://www.tearnet.com/sean</a>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...