AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.09.11 13:55 "Tags modifcation", by Gerben Koopmans
2002.09.11 14:21 "Re: Tags modifcation", by Frank Warmerdam
2002.09.30 18:23 "Re: Seek help", by Zhongfu Zhou
2002.09.30 17:34 "Seek help", by Zhongfu Zhou
2002.09.30 18:00 "Re: Seek help", by Frank Warmerdam
2002.10.01 04:36 "Re: Seek help", by Peter Montgomery

2002.09.30 18:00 "Re: Seek help", by Frank Warmerdam

 uint32 lSize;

int buffer[100];

...

TIFFSetField(image,TIFFTAG_BITSPERSAMPLE, 8);

...

TIFFWriteEncodedStrip(image,0,buffer,100);

Zhou,

Your fundamental mistake is using a 32 bit integer buffer 'buffer', when actually writing an 8bit per sample image. Try declaring buffer as "unsigned char buffer[100]" instead. I haven't tried your code so there may be other problems as well.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent