What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

LZW compression


RGNachman

New Member
Messages
2
Likes
0
I thought LZW compression of tiff files helped reduce size. I am finding that instead they enlarge my 65,000 kb files to 85,000 kb. What is going on here?
 
LZW is a compression algorithm that works best with data that is more than 8 bit, and with files that have a lot of repetitive data.
What happens is instead of recording repeated data say in text, it would just refer to where the word first showed. It is usually used for monochrome images and text. If there is not much repetitive data in your file, or is less than 12 bit, LZW will expand the file size rather than reduce it.

Hope this is of some help to you.

May I be bold enough to ask what you need this reduction of file size for, as I may be able to inform you of an alternative?
 
Steve, maybe did your file have a lot of compressible data, and not RGNacman's?
 
or is less than 12 bit, LZW may expand the file size rather than reduce it.

I meant to say 8 bit. Not quite sure why I put 12. Also I was slightly missleading to say it will enlarge the size, but it can and probably will if it does not at least have a lot of repetitive data within the file. I usually try not to be inacurate, but something obviously slipped through my net on this occasion.
 
Steve, maybe did your file have a lot of compressible data, and not RGNacman's?

It would seem so but how could you check that?
Mine was a single layer TIFF saved from a multi-layer PSD.

I'd be interested to see what happens if he tried dropping it in a ZIP or Rar folder.
I got 19.5 zip and 14.3 Rar.
 
LZW is lossless in it's compression, where as zip etc i don't know.

Zip is lossless!

Could do with knowing why he is doing it, cos the original file size doesn't seem that large to begin with.
 
Last edited:
It's lossless too.
Even a jpg will shrink a tinny bit, but to get larger by 20mb, somethings wrong.

This isn't something I know much about, but I would think (guess) the only way a compressed file could be larger than the original is when it's completely, 100% compressed already.
The overhead of the compression program could add a few kb to the file size.
 
LZW algorithm does include the look-up table of codes as part of the compressed file, so if it was already fully compressed, this would explain the extra size.
 
Apart from spending too much time on the internet, researching everything and anything to do with imaging and web design, as I have done. If you google something like how to compress a PDF or Tiff etc, there should be a wealth of info on all the file compression types, and which one is the best for the job you're doing. Sorry if the answer I have just given is too much like the obvious, but it either that or going to the local library.

I'm not sure if you can access the table, but with so many different lossless ways of compressing image files, I would use a different method.
 
Last edited:
I am transferring all my photos (just under 250 gb) to an external drive. Although the drive has 1 tb capacity, which should be plenty for anything, I just keep taking pictures. I know, it's a bad habit, but I am weak. About a year ago I began using LZW and my average photo size fell from 65,000 mb to about 45,000. So, I thought, since this collection began in 2003, if I compress the older pictures and save some 25% off the space that would add up. What I never gave a thought to was that LZW would do the opposite on these pictures to what it has been doing for me all year. Most of my pictures have considerable areas of sky or other smooth background or foreground. Since LZW is the compression of choice for TIFFs I also expected something better than a bloated file. If you know of a better method I am all ears.

Bob
 
It doesn't make sense to me that LZW is expanding your files, but like I said I don't know much about it.

I don't save as TIFF's I save my images as PSD's.
PSD is also a lossless compressed file format.
My 74mb Tiff is a 34mb PSD.
 

Back
Top