使用QPixmap::load()读取GeoTiff时出现TIFFReadDirectory警告

4
我有一个geotiff文件,我正在使用QPixmap :: load()将其加载到QPixmap中。我多次在控制台上打印以下警告。然而,直接使用libtiff打开它时没有警告。
有什么办法可以减轻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.

谢谢!


1
经过进一步的调查,它们实际上是geotiff标签。然而,似乎没有简单的方法可以禁用警告,因为QT默认报告来自底层libtiff库的所有警告。这不是什么大问题,但有点不美观。 - Brian
1个回答

2
这些是使用libtiff库定义的自定义标记:
http://www.remotesensing.org/libtiff/addingtags.html 它们可能是EXIF标记:
http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html 这些是libtiff已知的标记:
http://trac.imagemagick.org/browser/tiff/trunk/libtiff/tiff.h#L148 因为新的定义包括类型和计数,你可以猜测这些标记的含义。您还可以运行exiftool来查看未知的TIFF标记:
$ exiftool -htmldump sample.tif > /tmp/dump.html; firefox /tmp/dump.html

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接