PDA

View Full Version : LZW compression


eliseu gouveia
11-20-2003, 04:34 AM
Hi,

Ive got used to doing this over the time, so I practically dont pay atention anymore when converting my PSD files to TIFF, but now Im curious:

does anyone know what is LZW compression in TIFF files and what it does?

Thanks.

allenatl
11-20-2003, 06:16 AM
LZW compression reduces the file size when saving. It'll save space on your hard drive because of the smaller files. The drawback is that the compressed file takes longer to open because it has to decompress when opening. It's not noticeable on small files but with larger files it can become painfully obvious.
I wouldn't recommend using it on large files sent out to a printer because it slows down their production waiting on files to open.
Otherwise it's a good space-saver on your computer if you've got a lot of tiff files.

halo
11-21-2003, 06:42 PM
and unlike PNG and JPEG it does not damage the image.

It works best on images with areas of flatter colour rather than areas with tonnes of texture...images with noise added will see little gains from using it.

However the problem of the time taken can be offset against the saving in disk space or if you have to transfer the image over the net for instance.

allenatl
11-21-2003, 07:33 PM
Totally agree with you about offsetting the time problem, halo. It's usually a tradeoff. Depending on the situation, you have to decide which is more important, time or space.

halo
11-21-2003, 10:12 PM
yeh...usually i only use LZW at the end of the job when we send it off, we keep a PSD version as well.

AFAIK most RIP's these days handle LZW pretty well, its only the older systems that have a little trouble with it...quark takes longer to make a preview out of LZW files, but with machine speed these days being so good its less of a drag than it was before, but even so we prefer to just save out to a non native format when the job goes out of the door :)

JPEG set to 11/12 does a very good job of holding the image quality vs size if a job needs to be crunched more and image quality isnt 100% paramount.

Ikarus
11-22-2003, 03:52 AM
The LZW is a lossless compression, meaning it DOES NOT loose quality. The LZW algorithm compresses the image within the code itself, by finding repeating patterns within the structure of the bit data and creating tables of that pattern, thus substituting any additional similar patterns with the same code written only once. The compression varies depending if it's a photograph or a flat color background, but it will still compress the image 50-70% it's size, sometimes even 10-20% their sizes(usually on images with flat color and not too much texture to them).

I really have not noticed the longer time it takes to load up LZW images. Granted LZW images take alittle longer to load/open, the time it takes is almost neglegible in my opinion. Opening LZW images from a network, a CD, a Zip Disk, etc. is alot faster depending on the size of the image(specially print resolution images). You can do a test in photoshop to see how long it takes to open up images, the difference in time is a second or less. Open up photoshop, on the status bar on the bottom click on the arrow towards the middle left side, and change the options to "Timing". Now you can test how long it takes to open up your images, etc. :)

Halo by the way PNG's use a lossless compression as well, so they DO NOT loose any quality at all, unlike JPG's wich do loose quality.

halo
11-22-2003, 06:45 PM
i dont want to be pedantic, but thats not strictly true...PNG-8 does if your using 24 bit files to start with, PNG-24 doesnt :)

allenatl
11-23-2003, 10:00 PM
Just an added note to clarify: Unless you're regularly dealing with 200-600MB files then the time thing is not an issue.

CG.p
11-26-2003, 06:09 PM
Originally posted by halo
i dont want to be pedantic, but thats not strictly true...PNG-8 does if your using 24 bit files to start with, PNG-24 doesnt :)

Just like you didn't mention that in they blanket statment before. PNG24 will get the file size smaller than TIFF at any compression setting. I got a folder of TIFFs sent to me and just converting them to PNG24 went from 200 meg down to 30 meg.

If you save your Tiff with no compression and then zip/rar/ace them later you might get smaller file size. That would only be good for transfer or storage though.



***PNG tip*** :wip:
If you are using photoshop to save your pngs get SuperPNG (http://www.fnordware.com/superpng/)
it won't bloat your files with extra junk and will usually get even smaller files.

They guy also has a jeg2000 plugin for ps.

halo
11-26-2003, 07:50 PM
i just didnt want someone trying to compress using png 8 or telling someone to and getting a horrible shock.

yes PNG will get you smaller files than TIFF without LZW, but with it the only difference in size is due to layout previews and profile infomation which save for web can strip. Im not sure what the exact differences are between the PNG file structure and what it may sacrifice against the TIFF, but i'd expect the difference due to be largely to do with stuff "outside" of the image than the image itself. The compression algorithm maybe a little more efficient but probably not as much as one would think.

On large files this becomes much less of an issue, but TIFF is more widely accepted by the print community in RIP's and layout apps than PNG. PNG is more of a format designed around the web, however with the established workflows offering the almost same functionality and more compatability it's not as prevailent since its inception.

Compressing either file that already has been compressed at save with say winrar or winzip or stuffit will save you only a few % because the data structure is already tightly packed due to the files inherant compression. Its like trying to squash brick as opposed to foam. What you are normally compressing are the icon/previews for desktop and the header. With files saved without compression the data structure is much more open and able to be compressed.

As ever the amount of compression using losless methods is related to how noisy or textured your image is, but its worth experimenting to see what suits your purposes best.

CG.p
11-26-2003, 11:48 PM
Originally posted by halo

Compressing either file that already has been compressed at save with say winrar or winzip or stuffit will save you only a few % ....


That is why I said to not compress it using the format's compression. Zip and it's friends usually compress the image more than the built in compression tiffs use.

CGTalk Moderation
01-16-2006, 06:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.