2005.08.08 11:52 "Re: [Tiff] TIFF file from RAW format", by Joris
Please observe proper quoting style. In particular, please
- Don't bottom-quote. Humans need to see questions first, and answers next, otherwise things stop making sense.
- Don't overquote. We've all seen the message you reply to already. If messages go back and forth, and a complete quote is added each time, overhead quickly grows to enourmous, and this gets multiplied by the number of receivers, resulting in a huge waste of the planet's internet resource.
A good guide on quoting style is here:
/////////Write RAW to TIFF
TIFFSetField(image, TIFFTAG_IMAGEWIDTH, Width);
TIFFSetField(image, TIFFTAG_IMAGELENGTH, Height);
nBytesWritten = TIFFWriteRawStrip(image, 0, pszBMPImage, g_nBufferSize);
You trimmed your code too much to say anything for sure, or anything at all about the significant parts you left out. However, the use of TIFFWriteRawStrip seems very suspicious. Are you sure that's what you want?
If you've set compression to none (or any compression of your choice), and have set the RowsPerStrip tag and such to suitable values, you may next want to write your strips with calls to TIFFWriteEncodedStrip instead (that's right, even if you set compression to none).
Man page on TIFFWriteRawStrip: http://www.remotesensing.org/libtiff/man/TIFFWriteRawStrip.3tiff.html
Man page on TIFFWriteEncodedStrip: http://www.remotesensing.org/libtiff/man/TIFFWriteEncodedStrip.3tiff.html
Joris Van Damme
Download your free TIFF tag viewer for windows here: