2013-01-02 183 views
4

我有一個geotiff文件,我正在用QPixmap :: load()加載到QPixmap中。我多次向控制檯顯示以下警告。然而,直接使用libtiff會在沒有警告的情況下打開它。TIFFReadDirectory當使用QPixmap :: load()讀取GeoTiff時發出警告

有關如何減輕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

回答

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

相關問題