FITS 1.5.0 - Unable to identify tif files

55 views
Skip to first unread message

Satyam Reddy

unread,
Jan 14, 2020, 5:30:25 PM1/14/20
to fits-users
I am trying to process tif,tiff files using the new versions. It's only being identified by only Exiftool and others won't work.

sample output.

<identification status="SINGLE_RESULT">
    <identity format="TIFF EXIF" mimetype="image/tiff" toolname="FITS" toolversion="1.4.1">
      <tool toolname="Exiftool" toolversion="11.14" />
    </identity>
  </identification>

David Neiman

unread,
Jan 16, 2020, 9:13:13 AM1/16/20
to fits-users
Hello,

Two thoughts:

1) Without having the TIFF file to analyze, here is my guess as to why only Exiftool is providing output: As shown in the <identity> element in your sample output, there is format="TIFF EXIF". Other tools may have identified the format as "TIFF" but without "EXIF included". Since TIFF EXIF is a more specific format than only TIFF, only the output for the more specific type is included in the FITS output. A way to test this is to find the 'fits.xml' file within the 'xml' directory of your FITS deployment and comment out the line that begins with "<tool class="edu.harvard.hul.ois.fits.tools.exiftool.Exiftool"... " and process the TIFF file again to see if now there is output from other tools.

2) It looks like you are using FITS version 1.4.1, not 1.5.0 as seen at the end of the <identity...  line of your sample output.

Looking forward to seeing your results.

Satyam Reddy

unread,
Jan 21, 2020, 10:16:21 AM1/21/20
to fits-users
Hi David - Thanks for your inputs. I have tried commenting out the Exiftool and processed the TIFF file again. The format of the file was correctly identified by all the required tools except Exif. Here are the results. 

<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="1.5.0" timestamp="1/21/20, 9:59 AM">
  <identification>
    <identity format="Tagged Image File Format" mimetype="image/tiff" toolname="FITS" toolversion="1.5.0">
      <tool toolname="Droid" toolversion="6.4" />
      <tool toolname="Jhove" toolversion="1.20.1" />
      <tool toolname="file utility" toolversion="5.03" />
      <tool toolname="ffident" toolversion="0.2" />
      <tool toolname="Tika" toolversion="1.21" />
      <version toolname="Jhove" toolversion="1.20.1">6.0</version>
      <externalIdentifier toolname="Droid" toolversion="6.4" type="puid">fmt/353</externalIdentifier>
    </identity>
  </identification>
  <fileinfo>
    <size toolname="Jhove" toolversion="1.20.1">27903072</size>
    <filepath toolname="OIS File Information" toolversion="1.0" status="SINGLE_RESULT">C:\Users\pakkers\Downloads\01031170R_000001.tiff</filepath>
    <filename toolname="OIS File Information" toolversion="1.0" status="SINGLE_RESULT">01031170R_000001.tiff</filename>
    <md5checksum toolname="OIS File Information" toolversion="1.0" status="SINGLE_RESULT">8114f9d571b4b944f94c77d33cd4cd56</md5checksum>
    <fslastmodified toolname="OIS File Information" toolversion="1.0" status="SINGLE_RESULT">1579040369174</fslastmodified>
    <lastmodified toolname="Tika" toolversion="1.21" status="SINGLE_RESULT">2019-01-31T08:36:14</lastmodified>
  </fileinfo>
  <filestatus>
    <well-formed toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">true</well-formed>
    <valid toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">true</valid>
  </filestatus>
  <metadata>
    <image>
      <byteOrder toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">little endian</byteOrder>
      <compressionScheme toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">Uncompressed</compressionScheme>
      <imageWidth toolname="Jhove" toolversion="1.20.1">2561</imageWidth>
      <imageHeight toolname="Jhove" toolversion="1.20.1">3627</imageHeight>
      <colorSpace toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">RGB</colorSpace>
      <referenceBlackWhite toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">0 255 0 255 0 255</referenceBlackWhite>
      <iccProfileName toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">sRGB IEC61966-2.1</iccProfileName>
      <orientation toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">normal*</orientation>
      <samplingFrequencyUnit toolname="Jhove" toolversion="1.20.1">in.</samplingFrequencyUnit>
      <xSamplingFrequency toolname="Tika" toolversion="1.21" status="SINGLE_RESULT">400</xSamplingFrequency>
      <ySamplingFrequency toolname="Tika" toolversion="1.21" status="SINGLE_RESULT">400.0</ySamplingFrequency>
      <bitsPerSample toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">8 8 8</bitsPerSample>
      <samplesPerPixel toolname="Jhove" toolversion="1.20.1">3</samplesPerPixel>
      <imageProducer toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">The National Library of Medicine (www.nlm.nih.gov)</imageProducer>
      <scanningSoftwareName toolname="Jhove" toolversion="1.20.1" status="SINGLE_RESULT">CCS docWorks v7.0-0.3</scanningSoftwareName>
    </image>
  </metadata>
  <statistics fitsExecutionTime="761">
    <tool toolname="MediaInfo" toolversion="0.7.75" status="did not run" />
    <tool toolname="OIS Audio Information" toolversion="0.1" status="did not run" />
    <tool toolname="ADL Tool" toolversion="0.1" status="did not run" />
    <tool toolname="VTT Tool" toolversion="0.1" status="did not run" />
    <tool toolname="Droid" toolversion="6.4" executionTime="405" />
    <tool toolname="Jhove" toolversion="1.20.1" executionTime="691" />
    <tool toolname="file utility" toolversion="5.03" executionTime="734" />
    <tool toolname="NLNZ Metadata Extractor" toolversion="3.6GA" status="did not run" />
    <tool toolname="OIS File Information" toolversion="1.0" executionTime="162" />
    <tool toolname="OIS XML Metadata" toolversion="0.2" status="did not run" />
    <tool toolname="ffident" toolversion="0.2" executionTime="592" />
    <tool toolname="Tika" toolversion="1.21" executionTime="579" />
  </statistics>
</fits>

Satyam Reddy

unread,
Jan 21, 2020, 10:36:17 AM1/21/20
to fits-users
Additionally, I ran the TIFF file directly with Exif tool and it correctly identifies the format. Is it a configuration issue in FITS?

David Neiman

unread,
Jan 21, 2020, 11:40:44 AM1/21/20
to fits-users
Hi Satyam,

Yes, it's configuration within FITS that is causing this. This is a result of the needs of the Harvard library where we maintain FITS and process files for the library. You are welcome to play around with an Exiftool configuration file that will affect the 'format' attribute output but we will not be able to provide much additional support beyond that.

Look at the file within the the FITS deployment in xml/exiftool/exiftool_common_to_fits.xslt.

First try commenting out lines 101 through 103 as follows and examine your resuls:
<!--                     <xsl:when test="not(string-length($exifByteOrder) = 0) and not(exiftool/FileType = 'JP2')"> -->
<!--                         <xsl:value-of select="concat(exiftool/FileType,' EXIF')" /> -->
<!--                     </xsl:when> -->

Then you could try commenting out, in the same file, lines 95 through 97:
<!--                     <xsl:when test="not(string-length($exif) = 0) and not(exiftool/FileType = 'JP2')"> -->
<!--                         <xsl:value-of select="concat(exiftool/FileType,' EXIF')" /> -->
<!--                     </xsl:when> -->

Good luck with experimenting,
David

Satyam Reddy

unread,
Jan 21, 2020, 11:59:39 AM1/21/20
to fits-users
It worked by commenting lines 101 through 103. Thanks for your help and support.
Reply all
Reply to author
Forward
0 new messages