问题
I have a geotiff file which I am loading into a QPixmap with QPixmap::load( ). I get the following warnings printed to the console a bunch of times. However, direct use of libtiff opens it without warnings.
Any ideas on how to alleviate these unsightly warnings in QT?
TIFFReadDirectory: Warning, foo: unknown field with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34735 (0x87af) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34736 (0x87b0) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34737 (0x87b1) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34735 (0x87af) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34736 (0x87b0) encountered.
TIFFReadDirectory: Warning, foo: unknown field with tag 34737 (0x87b1) encountered.
Thanks!
回答1:
These are custom tags which can be defined with the libtiff library:
http://www.remotesensing.org/libtiff/addingtags.html
They are probably EXIF tags:
http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html
These are the known tags to libtiff:
http://trac.imagemagick.org/browser/tiff/trunk/libtiff/tiff.h#L148
Since the new definitions include type and count, you may guess, what these tags mean. Also you can run exiftool to examine unknown TIFF tags:
$ exiftool -htmldump sample.tif > /tmp/dump.html; firefox /tmp/dump.html
来源:https://stackoverflow.com/questions/14127160/tiffreaddirectory-warnings-when-reading-geotiff-with-qpixmapload