TIFF and LibTiff Mail List Archive


1999.12.10 14:19 "TIFF tags out of order", by Bruce Cameron
1999.12.10 14:56 "Re: TIFF tags out of order", by Frank Warmerdam

1999.12.10 14:56 "Re: TIFF tags out of order", by Frank Warmerdam

This is a question that requires a bit of explanation. I am on NT using the TIFF library [in C++]. So, if there is an error, there is a dialog box brought up and the program waits for user reply. This is fine for interactive use, but not for workhorse programs that run at night.

Fine, the library has a command for turning off dialog and writing to a log file. But I wanted to see any 'odd' such messages and stop the off line processing. But some of the messages I know for the current set of images are unimportant - so I added the 'TIFFReassignTagToIgnore' function [I am responsible for putting that into the last library release]. This lets the user specify tags that he/she knows will cause the dialog, set them to be ignored so no diallg, but if another error the dialog will come up and user be alerted. Now I find some files that have 'TIFF tags out of order'. I used tiffinfo to find out what, and in fact in this case the out of order tag could be added to my 'ignore' list and all worked out. But what I want to know is if there is another way to handle the 'out of order' error - so if the tag that is out of order cannot be added to the 'ignore' set I can still operate?


I have been faced with a similar problem in the past with libtiff, and my solution was to implement my own warning function. In it I examined the message, and ignored a set of messages that I didn't want to show to the user.

This is a flexible approach, but you are forced to hard code substrings to use in recognising warnings you want to ignore.

Best regards,

I set the clouds in motion - turned up | Frank Warmerdam,
light and sound - activate the windows |
and watch the world go round - Rush    | Geospatial Programmer for Rent