AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.12.29 09:39 "[Tiff] TR:", by Jamel BEL HADJ BRAHIM
2004.12.29 10:37 "Re: [Tiff] TR:", by Joris Van Damme
2004.12.29 11:32 "[Tiff] (no subject)", by Jamel BEL HADJ BRAHIM
2004.12.30 08:42 "[Tiff] Search samples of using COMPRESSION_CCITTFAX4, LSB2MSB", by Jamel BEL HADJ BRAHIM
2004.12.30 11:41 "Re: [Tiff] Search samples of using COMPRESSION_CCITTFAX4, LSB2MSB", by Joris Van Damme

2004.12.29 09:39 "[Tiff] TR:", by Jamel BEL HADJ BRAHIM

How can I use FillOrder=Lsb2ToMsb, TIFFTAG_COMPRESSION = COMPRESSION_CCITTFAX4?

Usually I obtain a black image.

My code is:

            TIFFSetField(out, TIFFTAG_IMAGEWIDTH, XSIZE); 
            TIFFSetField(out, TIFFTAG_IMAGELENGTH, YSIZE); 
            TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 2); 
            TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1); 
            TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, YSIZE); 
            TIFFSetField(out, TIFFTAG_SUBFILETYPE, 0); 
  
            TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); 
            TIFFSetField(out, TIFFTAG_GROUP4OPTIONS, 0); 
            TIFFSetField(out, TIFFTAG_FAXMODE, FAXMODE_CLASSF); 
            TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); 
            TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); 
                  TIFFSetField(out, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB); 
  
            TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); 
            TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); 
            TIFFSetField(out, TIFFTAG_XRESOLUTION, 204.0); 
            TIFFSetField(out, TIFFTAG_YRESOLUTION, 196.0); 
            TIFFSetField(out, TIFFTAG_DATETIME, "2004:12:23 10:17:19"); 
            TIFFSetField(out, TIFFTAG_SOFTWARE, "Jamel"); 
            TIFFSetField(out, TIFFTAG_PAGENUMBER, 0, 1); 
  
            TIFFWriteEncodedStrip(out, 0, buffer, XSIZE * YSIZE); 
             TIFFWriteDirectory(out);