gpt4 book ai didi

ImageMagick:处理TIFF时如何摆脱有关 "Unknown field"的TIFFWarnings/768消息?

转载 作者:行者123 更新时间:2023-12-04 13:59:51 28 4
gpt4 key购买 nike

我将ETOPO1.tif处理到一个裁剪好的山坡阴影中。

我得到a tiff image看起来像:

当我通过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.

我的.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. [...]
[...]

此处列出的标签是GeoTIFF的 private tags 。看这里:
  • http://www.awaresystems.be/imaging/tiff/tifftags/private.html

  • 要查看它们的内容(可能对您没有什么意义),可以使用 tiffdump(或 tiffutil -dump)实用程序。 exiftool有可能向您显示这些标签的含义:
     exiftool -a -U -u -g1 Yug-Shadedrelief.tmp.tif
    -u-U也应该提取所有未知(到 exiftool)标签。如果您的输出中没有“垃圾”,那么 exiftool可以根据所看到的内容来回显示标题,所以:-)

    也许您可以选择删除这些标签? exiftool也可以为您做...

    如果您只想让烦人的消息视而不见,而又不更改TIFF,则对命令执行stderr的 2> /dev/null重定向就足够了:
    convert                    \
    Yug-shadedrelief.tmp.tif \
    -fuzz 7% \
    -fill "#FFFFFF" \
    -opaque "#DDDDDD" \
    whited.jpg \
    2>/dev/null

    更新
     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 ...

    说明:
  • 33550:“...可选,用于定义栅格和模型空间之间的精确仿射变换...。”
  • 33922:“...也称为'GeoreferenceTag'。此标签存储栅格->模型联络点对...”
  • 34735:“...也称为'ProjectionInfoTag'和'CoordSystemInfoTag'”
  • 34736:“...用于存储所有由GeoKeyDirectoryTag引用的DOUBLE值的所有GeoKey ...”
  • 34737:“...用于存储所有由ASCII键值的GeoKey,由GeoKeyDirectoryTag引用”
  • 42113:“...用于标记没有可用信息的地理空间区域的特殊像素值...”
  • 关于ImageMagick:处理TIFF时如何摆脱有关 "Unknown field"的TIFFWarnings/768消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27608124/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com