AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
May 1998

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



1998.05.10 10:35 "Re: LZW compression and predictor", by Gilles Vollant

I've added, after my TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW)
a TIFFSetField (tif, TIFFTAG_PREDICTOR, 2)

The result is good!

Some size of the same image in TIFF format with LZW :

A  8 bits image :
LibTiff without predictor = 2 : 180 KB
LibTiff with predictor = 2 : 134 KB
Photoshop 4 : 100 KB
Paint shop pro 5 : 82 KB


A 24 bits image:
LibTiff without predictor = 2 : 469 KB
LibTiff with predictor = 2 : 225 KB
Photoshop 4 : 229 KB
Paint shop pro 5 : 198 KB


The 8 bits same image in GIF with Photoshop : 44 KB 
The 8 bits same image in GIF with PSP : 44 KB
The 8 bits same image in PNG with Photoshop : 53 KB
The 8 bits same image in PNG with PSP : 40 KB

The 24 bits same image in PNG with Photoshop: 86 KB
The 24 bits same image in PNG with PSP : 59 KB
-----Original Message-----
From: bla@srz-berlin.de [mailto:bla@srz-berlin.de]On Behalf Of Helge
Blischke
Sent: dimanche 10 mai 1998 02:26
To: Gilles Vollant
Subject: Re: Choose between TIFFScanline and TIFFReadRGBAImage


Gilles Vollant wrote:
> 
> ok.
> 
> Can you just say me how I select the predictor?
> I just do a  TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW)
add a TIFFSetField (tif, TIFFTAG_PREDICTOR, 2)
(I think there isn't a define for this constant in tiff.h).
If you are in doubt, have a look at the source of tiffcp
Helge
-- 
H.Blischke@srz-berlin.de
H.Blischke@srz-berlin.com
H.Blischke@acm.org