2004.10.20 10:25 "Re: [Tiff] The format of buffer returned by routines in tiffcp", by Sachin Garg
On Wed, 20 Oct 2004 12:16:00 +0200, Gerben Vos <firstname.lastname@example.org> wrote:
Tiffcp has some handy routines to read/write data into buffer from variious types of tiff files (eg readContigTilesIntoBuffer etc...)
What is the structure of data which we get in these buffer? Is it dependent on the type of tiff from which we are reading or is it in same in all cases?
These tiffcp routines (I have an old version in front of me, but I suppose this hasn't changed) always convert the buffer to rgbrgbrgbrgbrgbrgbrgb, by using the cpSeparateBufToContigBuf function when reading and cpContigBufToSeparateBuf when writing. So you don't have to deal with the PlanarConfiguration tag anymore.
Also, are there any extra bytes at the end of each row?
Each row in the buffer is padded with bits until the next byte. Not to a multiple of bytes as in, for example, BMP.
This should be easy to handle... thanks.
Sachin Garg [India]