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