Search code examples
tiff

Tiff versus BigTiff


Please let me know if there is another Stack Exchange community this question would be better suited for.

I am trying to understand the basic differences between Tiff and BigTiff. I have looked on various sites and the only difference that is mentioned is that BigTiff uses 64-bit offsets while Tiff uses 32-bit offsets. That being said, you would need to know which of the two types you are reading. How is this done? According to https://www.leadtools.com/help/leadtools/v19/main/api/tifffmt.html, this is done by reading a file flag. However, the flag they are referring to appears to be unique to their own reader as I cannot find a corresponding data field in the specifications as shown by http://www.fileformat.info/format/tiff/egff.htm. What am I missing? Does BigTiff use a different file header than Tiff?


Solution

  • Everything you need to know is described in the BigTIFF link posted by @cgohlke, but to provide an answer, here's a quick summary:

    Yes, it uses a different file header.

    Normal TIFF uses the following header:

    • 2 byte byte order mark, "II" for "Intel"/little endian, or "MM" for "Motorola"/big endian.
    • The (version) number 42* as a 16 bit value, in the endianness given.
    • Unsigned 32 bit offset to IFD0

    BigTIFF uses a slightly different header:

    • 2 byte byte order mark as above
    • The (version) number 43 as a 16 bit value, in the endianness given.
    • Byte size of offset as a 16 bit value, always 8 for BigTIFF
    • 2 byte padding, always 0 for BigTIFF
    • Unsigned 64 bit offset to IFD0

    *) The value 42 was chosen for its "deep philosophical significance". Or according to the official specification, "[a]n arbitrary but carefully chosen number"...