AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.05.07 01:13 "[Tiff] LW support?", by arnaud janc
2006.05.07 02:47 "Re: [Tiff] LW support?", by Frank Warmerdam
2006.05.07 10:43 "Re: [Tiff] LW support?", by arnaud janc

2006.05.07 01:13 "[Tiff] LW support?", by arnaud janc

Hi,

I would like to read tiff linework (LW) images. But it doesn't work with libtiff. Is there any problem of patent which justify this lack of support? I saw two things to deal with:

1/ Compression

Tag is define in tiff.h but the codec is not implemented

tiff.h:#define      COMPRESSION_IT8LW           32896 

 /* IT8 Linework RLE */

but there is nothing in tif_codec.c and nothing like "tif_lw.c" exists. Does anybody have an idea of the complexity to do such job? I know there are short run and long run to deal with in the compression and obviously some speed improvement to take care.

2/ COLORTABLE

Once again the tag is define but nothing is implemented.

tiff.h:#define TIFFTAG_IT8COLORTABLE 34022
 /* LW colortable */

As far I can see the function "TIFFRGBAImageBegin" should read the tag and fill some tables (one per channel). Those tables are then use in function "makecmap" to fill a table "PALmap" from TIFFRGBAImage.

The problem is that the structure is only define for RGB colormap (indexed tiff) so there is only 3 tables available instead of 4. A quick and dirty hack would be to simply use only the first one table to store data from TAG before filling "PALmap". We should then use PACK4 instead of PACK to fill it.

For the moment that's all

If anybody could give me some advice (or directly a working patch ;-) )

thanks in advance

___________________________________________________________________________
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés: vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel.
Rendez-vous sur http://fr.yahoo.com/set