LZW commpression not applied to TIFF

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
dosdan
Posts: 17
Joined: Mon Sep 15, 2008 3:07 am
Location: Brisbane

LZW commpression not applied to TIFF

Post by dosdan »

XnView 1.95.4.

When saving a TIFF, LZW compression is not used in "SaveAs" or "Export" even if it's ticked. I tested the same image in FastStone and it did work and the TIFF was about 25% smaller.

Dan.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

It looks like many programs use LZW + Predict, and not just LZW. I found a command line program (tiffcp) which produces comparable results for each option.
dosdan
Posts: 17
Joined: Mon Sep 15, 2008 3:07 am
Location: Brisbane

Post by dosdan »

That may be the case, but XnView has a bug. The file info indates that no compression was used, even though it was selected in the JPG saving options.

By the way, typically how much extra gain is there from adding prediction to LZW when compressing photos?
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

dosdan wrote: By the way, typically how much extra gain is there from adding prediction to LZW when compressing photos?
I see 40%+ difference with a handful of samples.
siepict
Posts: 29
Joined: Fri Nov 14, 2008 6:25 pm

no compression

Post by siepict »

Hi dosdan,
just to confirm but
[quote="dosdan"]The file info indates that no compression was used, /quote]
a bit different with me:
- file lzw compressed (by different software): 20.4 Mb
open that file and saved as by xnview lzw checked on: filesize 28.2 Mb, xnview shows image properties - compression : lzw
-
opening an uncompressed tiff by xnview and saved as compressed: nearly no differene in filesize but compression indicator shows lzw.
horst
Guest

Re: no compression

Post by Guest »

siepict wrote:opening an uncompressed tiff by xnview and saved as compressed: nearly no differene in filesize but compression indicator shows lzw.
horst
Take the same uncompressed TIFF & save it as a LZW-compressed TIFF in another freeware package such as as FastStone, ans see how much it drops.

The compressability of a TIFF will depend on the content. Here are some test sizes on a 1500x1000 TIFF file using "true" KB (1,024 bytes). Actual filesize is 4,508,248 bytes. The slightly greater size then the calculated 4,500,000 bytes is due to the overhead of the TIFF file header.

Code: Select all

TIF             4,403KB  100%
TIF/LZW         3,120KB   71%
JPG 100%        1,190KB   27%
JPG  95%          617KB   14%
JPG  90%          435KB   10%
JPG  80%          297KB    7%
JPG  70%          237KB    5%
I had to redo this test in FastStone after first attempting it in XnView.

<Moderator's note: Double post has been deleted.>.
siepict
Posts: 29
Joined: Fri Nov 14, 2008 6:25 pm

?

Post by siepict »

Hi Guest,
please, what do you want to tell? I don't understand what the listing has to do with the prolem that is dicussed here?
horst
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: LZW commpression not applied to TIFF

Post by xnview »

Could you send me a sample used to convert in LZW TIFF?
Pierre.
siepict
Posts: 29
Joined: Fri Nov 14, 2008 6:25 pm

Re: LZW commpression not applied to TIFF

Post by siepict »

Pierre,
sure, but I will try to create a file a bit smaller then my 30 Mb files ;-).
Which e-mail adress ( <removed> ? )
horst

<Moderator's note: Mail address has been removed - please see Rules and Guidelines>
Dreamer
XnThusiast
Posts: 4608
Joined: Sun Jul 25, 2004 9:08 pm

Re: LZW commpression not applied to TIFF

Post by Dreamer »

siepict wrote:Which e-mail adress ( <removed> ? )
How to contact the author
Dreamer
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: LZW commpression not applied to TIFF

Post by xnview »

siepict wrote:Pierre,
sure, but I will try to create a file a bit smaller then my 30 Mb files ;-).
Which e-mail adress ( <removed> ? )
horst
Ok, you can try LZW+Predict, and the result is smaller
Pierre.
siepict
Posts: 29
Joined: Fri Nov 14, 2008 6:25 pm

confirmation?

Post by siepict »

Pierre, have you got my PM? horst
edit: I've just tried 'predict' option, and must confess, that works fine.
I've never read about that, always and only 'LZW', that was the reason, why I haven't tried.
Maybe a litle hint in the space of that dialog box will help to select the 'correct' compression mode?
horst
Post Reply