2006.05.25 17:24 "[Tiff] libtiff writes zero valued tile offsets and byte counts", by Thomas Sharpless

2006.06.08 22:27 "RE: [Tiff] libtiff writes zero valued tile offsets and byte counts", by Mark R. Olin

Since this is an interesting dialog, and everyone is speculating, I feel more confident of my speculation. Perhaps it is the case that when Photoshop reads zero for size and offset, it defaults to the uncompressed case and to a default size, in which case it can compute a fixed bytecount for each tile and subsequently compute all tile offsets from a starting point after the TIFF headersize?

For this to hold of course, the camera software is in fact writing the image data uncompressed:

>       TIFFSetField( ptiff, TIFFTAG_COMPRESSION, 1 ); // uncompressed

then the guess is possible is it not?

Mark Olin

-----Original Message-----

From: tiff-bounces@lists.maptools.org [mailto:tiff-bounces@lists.maptools.org] On Behalf Of Joris

Yes, Photoshop does try to read a lot of non-conforming TIFF images.

For the case given, it should only work if compression == none (so we can compute the tile size).

I can understand computing and auto-correcting tile sizes when there's no compression. However, Thomas indicated both tile sizes and offsets are 0. Can Photoshop handle that case, or did you not read the part where it says offsets too are 0? If the first is the case, would you mind giving us some indication of how Photoshop proceeds in guessing the location of the tiles, so as to establish a non-official recommended way to guess these, as it seems to me any such guess in this case is either very arbitrary, yielding garbage in many cases, and/or works from known behaviour of particular writer implementations?