Hug*_*lpz 6 tiff imagemagick gdal
我将ETOPO1.tif处理成一个裁剪区域的山体阴影.
我得到一个tiff图像看起来像:
当我通过ImageMagick处理它时,它成功运行.但我得到以下一组警告信息:
convert Yug-shadedrelief.tmp.tif -fuzz 7% -fill "#FFFFFF" -opaque "#DDDDDD" whited.jpg # lighter (0.9M)
convert.im6: Unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Unknown field with tag 34735 (0x87af) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Unknown field with tag 34736 (0x87b0) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Unknown field with tag 34737 (0x87b1) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Unknown field with tag 42113 (0xa481) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
Run Code Online (Sandbox Code Playgroud)
我的.tif是否已损坏?
我该怎么做才能把这些消息拿出来?
不像你原来的标题(我改变了),这不是一个'错误'的消息,而只是一个警告:
TIFFReadDirectory: Warning, Unknown field with tag 33550 (0x830e) encountered. [...]
TIFFReadDirectory: Warning, Unknown field with tag 33922 (0x8482) encountered. [...]
TIFFReadDirectory: Warning, Unknown field with tag 34735 (0x87af) encountered. [...]
[...]
Run Code Online (Sandbox Code Playgroud)
要查看它们(可能对您没有意义)内容,您可以使用tiffdump(或tiffutil -dump)实用程序.有exiftool可能向您展示这些标签的含义:
exiftool -a -U -u -g1 Yug-Shadedrelief.tmp.tif
Run Code Online (Sandbox Code Playgroud)
该-u和-U也应该提取所有未知的(到exiftool)标签.如果你的输出中没有"垃圾",exiftool能够从它看到的东西做出正面和反面,所以你应该:-)
也许你可以选择发布删除这些标签?exiftool也可以为你做...
如果您只想从您的视力中获取恼人的消息,而不是更改您的TIFF,那么为您的命令2> /dev/null重定向stderr就足够了:
convert \
Yug-shadedrelief.tmp.tif \
-fuzz 7% \
-fill "#FFFFFF" \
-opaque "#DDDDDD" \
whited.jpg \
2>/dev/null
Run Code Online (Sandbox Code Playgroud)
Code | Code | |
(dec) | (hex) | Tag Name | Short Description
------+-------+---------------------+--------------------------------------------------------
33550 | 830E | ModelPixelScaleTag | Used in interchangeable GeoTIFF files
33922 | 8482 | ModelTiepointTag | Originally part of Intergraph's GeoTIFF,
34735 | 87af | GeoKeyDirectoryTag | Used in interchangeable GeoTIFF files
34736 | 87b0 | GeoDoubleParamsTag | Used in interchangeable GeoTIFF files
34737 | 87b1 | GeoAsciiParamsTag | Used in interchangeable GeoTIFF files
42113 | a481 | GDAL_NODATA | Used by GDAL lib, contains ASCII encoded nodata or ...
Run Code Online (Sandbox Code Playgroud)
说明:
我的 .tif 是否已损坏?
不,这些只是关于Imagemagick 不知道的其他元数据(私有 TIFF 标签)的警告。
我该怎么做才能删除这些消息?
添加命令行选项-quiet以抑制所有警告消息(如 Mark Setchell 在评论中建议的那样)。
| 归档时间: |
|
| 查看次数: |
8432 次 |
| 最近记录: |