AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
May 2006

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2006.05.25 17:24 "libtiff writes zero valued tile offsets and byte counts", by Thomas Sharpless
2006.05.30 08:42 "Re: libtiff writes zero valued tile offsets and byte counts", by Gerben Vos
2006.05.30 18:04 "Re: libtiff writes zero valued tile offsets and byte counts", by Chris Cox
2006.06.01 03:42 "Re: libtiff writes zero valued tile offsets and byte counts", by Joris Van Damme
2006.06.01 04:09 "Re: libtiff writes zero valued tile offsets and byte counts", by Chris Cox
2006.06.08 22:27 "Re: libtiff writes zero valued tile offsets and byte counts", by Mark R Olin
2006.06.08 23:22 "Re: libtiff writes zero valued tile offsets and byte counts", by Joris Van Damme
2006.06.08 18:44 "Re: libtiff writes zero valued tile offsets and byte counts", by Frank Warmerdam

2006.06.08 23:22 "Re: libtiff writes zero valued tile offsets and byte counts", by Joris Van Damme

Mark,

Mark R. Olin wrote:
> then the guess is possible is it not?

Without investigation of Photoshop source code, anything's possible.
Hower, two things to note here:

1) There is such a thing as damaging, too farfetched guesswork.
1a) One bad consequence of such guesswork, is that people who don't
actually bother to really double-check the output of a new writer but
are satisfied with (some) interoperability testing, produce increasing
numbers of bugs. An example of this, is the default subsampling value
correction for JPEG compression in TIFF, as implemented in LibTiff,
especially since warnings were traditionally hard to manage with LibTiff
in any environment with more complexity then a single-TIFF-session
command line stderr like setup. A bad writer designed could be writing
incorrect subsampling values, test the results with LibTiff,
conviniently not see warnings, and conclude the job's well done.
1b) Things get worse if the 'guesswork' that corrects some mistakes in
files, renders correct but less common files incorrectly. One example of
this is the handling of ExtraSamples in the LibTiff RGBA interface in
current CVS. If an extra sample is correctly stated as unspecified, it
is incorrectly interpreted as alpha by LibTiff RGBA interface. Even in
images where the color samples are followed by some extra samples
correctly stated as unspecified, and next an extra sample correctly
stated as alpha, still the first extra sample is incorrectly taken to be
the alpha channel. All of this is, I believe, a consequence of trying to
auto-correct the case where a single extra channel that is like to be
alpha, is not specified by the ExtraSamples tag.
1c) All such guesswork, for a codec coding point of view, is like a
'hack on top off' the actual design. Such hacks have a tendency to
cummulate over time, complicate further developement, and result in
unforseen bugs. One example of this is, again, the subsampling values
correction in tif_jpeg.c that badly interfers with the setup of a
LibJpeg decoding/encoding session so as to result in the wrong type of
session in some unforseen circumstances.

All in all, I'm not saying auto-corrective guessing is wrong. I'm saying
it should be thought through carefully in a specific case-by-case
manner, and there certainly is such a thing as taking it too far. I'm
also saying that was is best for a specific user, or even for a specific
library, may not be best for the file format support and community that
depends on the ambigious degree of correctness in files-out-there as a
whole.

2) Chris noted earlier, that Photoshop does *not* correct missing
offsets. See http://www.asmail.be/msg0054869483.html. In my personal
humble opinion, that's a good thing, since that would defenetly qualify
as 'taking it too far'.


Best regards,


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html