ImageMagick: How to get rid of TIFFWarnings / 768 message about "Unknown field" when processing TIFF?

I am processing ETOPO1.tif into a cropped hill.

I am getting a tiff image similar to:enter image description here

When I process it with ImageMagick it starts successfully. But I am getting the following set of warning messages:

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.

      

Am I damaged my .tif?

What can you do to remove these messages?

+3


source to share


2 answers


Unlike your original header (which I changed), this is not an error message, but just a warning:

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

      

The following are personal tags from GeoTIFF. See here:

To look at content (maybe not very relevant to you), you can use a utility tiffdump

(or tiffutil -dump

). There is a possibility that exiftool

might show you the meanings of these tags:

 exiftool -a -U -u -g1 Yug-Shadedrelief.tmp.tif

      

-u

and -u

must also extract all unknown (before exiftool

) tags. If you don't have "garbage" in your release, I exiftool

was able to make heads and tails from what I saw, and you also need to :-)

Perhaps it is an option for release to remove these tags? exiftool

can also do it for you ...



If you want to get annoying messages out of your sight and not modify your TIFFs, then the redirection 2> /dev/null

to stderr for your commands will suffice :

convert                    \
  Yug-shadedrelief.tmp.tif \
 -fuzz 7%                  \
 -fill "#FFFFFF"           \
 -opaque "#DDDDDD"         \
  whited.jpg               \
  2>/dev/null

      


Update

 Code |  Code |                     |
(dec) | (hex) | Tag Name            | Short Description
------+-------+---------------------+--------------------------------------------------------
33550 | 830E  | ModelPixelScaleTag  | Used in interchangeable GeoTIFF files
33922 | 8482  | ModelTiepointTag    | Originally part of Intergraph 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 ...

      

Explanations:

  • 33550 : "... optional to define precise affine transformations between raster and model space ...."
  • 33922 : "... also known as" GeoreferenceTag ". This tag stores the tie point of the raster-> model pairs ..."
  • 34735 : "... also known as" ProjectionInfoTag "and" CoordSystemInfoTag "
  • 34736 : "... used to store all DOUBLE valuable GeoKeys referenced by GeoKeyDirectoryTag ..."
  • 34737 : "... is used to store all AQII oriented GeoKeys referenced by GeoKeyDirectoryTag"
  • 42113 : "... a special pixel value for marking geospatial areas for which there is no information ..."
+7


source


You can recompile libtiff with:



  • adding these lines to tiff.h

    #define TIFFTAG_ModelPixelScale 33550

  • adding to TIFFFieldInfo in tif_dirinfo.c file

    static const TIFFFieldInfo; tiffFieldInfo[] = {..., { TIFFTAG_ModelPixelScale,1, 1, TIFF_LONG, FIELD_SUBFILETYPE, 1, 0, "ModelPixelScale" }, ... };

+1


source







All Articles