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

2004.12.09 12:48 "Re: [Tiff] Q: writing tiled TIFFs", by Chris Losinger

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).

Are you properly padding stuff, so as to end up with 256 lines of 256 pixels? If not, you ought to.

yes. i'm copying squares out of my source image into a 256x256 buffer (doing what amounts to an image overlay of the source onto the tile buffer - so the tile buffer maintains its 256x256 nature and the overlayed image only covers a part of the tile buffer). then i pass that to TIFFWriteTile.

However, I wouldn't write such a TIFF as tiled, even though you can. If you consider 256x256 good tile sizes,

256x256 is apparently the LibTiff default. why does LibTiff choose that for a 200x200 image? i don't know.

i'm just trying to figure out tile writing in general.

----
Chris Losinger
losinger@earthlink.net
smallest@smalleranimals.com          http://www.smalleranimals.com