TiffWarnings/820
Posted: 2018-11-19T09:38:55-07:00
Hi,
this may in fact be a bug but I am posting this as a question a user might have.
I got a number of "tif" files from a scientific instrument which I can display. However, I need to get access to the comments added to the tif file as they contain information about how this image was acquired (instrument parameter). I have used this on other images before so I am using
$ identify -verbose 20181107-SRC-C7-0003.tif
It prints a lot of output and when it is (in my estimate) about to print the Comments: it exits with:
Version: ImageMagick 6.7.8-9 2016-06-16 Q16 http://www.imagemagick.org
identify: Unknown field with tag 50345 (0xc4a9) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/820.
identify: ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/820.
However, in display I can see the comments in the "Image Info" function:
[a lot of information]
Properties:
comment: [TemImageFile]
nstrument Name=...
ate=11/07/18
ime=3:12:48 p
ample=
I just noticed all the comments are missing their first character ! It is Instrument not nstrument Name
Anyhow, it seems that there may be a way to get the pure comment string(s) from an image; here the user question - how can I get the comments on the command line ?
I need the comments for further processing. Normally I run something like set comment [exec -- identify -verbos $filename_tif] in a tcl script.
Is there another way? Can one ask identify to ignore errors in tags since 'display' does not seem to care ?
OS: Centos 7 I tired the above 6.7.8 and 7.0.7 on another computer with the same result.
Thanks,
Lothar
this may in fact be a bug but I am posting this as a question a user might have.
I got a number of "tif" files from a scientific instrument which I can display. However, I need to get access to the comments added to the tif file as they contain information about how this image was acquired (instrument parameter). I have used this on other images before so I am using
$ identify -verbose 20181107-SRC-C7-0003.tif
It prints a lot of output and when it is (in my estimate) about to print the Comments: it exits with:
Version: ImageMagick 6.7.8-9 2016-06-16 Q16 http://www.imagemagick.org
identify: Unknown field with tag 50345 (0xc4a9) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/820.
identify: ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/820.
However, in display I can see the comments in the "Image Info" function:
[a lot of information]
Properties:
comment: [TemImageFile]
nstrument Name=...
ate=11/07/18
ime=3:12:48 p
ample=
I just noticed all the comments are missing their first character ! It is Instrument not nstrument Name
Anyhow, it seems that there may be a way to get the pure comment string(s) from an image; here the user question - how can I get the comments on the command line ?
I need the comments for further processing. Normally I run something like set comment [exec -- identify -verbos $filename_tif] in a tcl script.
Is there another way? Can one ask identify to ignore errors in tags since 'display' does not seem to care ?
OS: Centos 7 I tired the above 6.7.8 and 7.0.7 on another computer with the same result.
Thanks,
Lothar