2004.12.08 02:35 "[Tiff] Q: writing tiled TIFFs", by Chris Losinger

2004.12.09 06:57 "Re: [Tiff] Q: writing tiled TIFFs", by Sachin Garg

i'd just prefer to see a simple explanation of what TIFFWriteTile expects, what the rules are for tile sizes, what z-order means here, etc..

As to TIFFWriteTile, the tile functions are very similar to the strip functions. Except of course that tiles are a rectangular array, top-left, top-not-so-left,..., not-so-top-left, not-so-top-not-so-left,...,bottom-right.

if i have a tile size of 256x256 and a 200x200 image, how should i fill the tile buffer before calling TIFFWriteTile? LibTiff doesn't give me any errors when i go to write it, so i assume it's a legal tile size. but, the image pixels are messed up (looks like row length is wrong somewhere).

I am "guessing" that you will probably have to write data for 56 extra pixels after each row.

For example if the bit depth is 8 per channel, and its a rgb image, then you must be writting 3 bytes for each pixel. So in the case you describe above, you must be writting 3*200 bytes for each row, now you will probably have to write 3*56 more NULL bytes after each rows data, and then write the next rows data again followed by 3*56 NULL bytes and so on.

Sachin Garg [India]
http://www.geocities.com/schngrg