Tiff versus BigTiff

安稳与你 提交于 2019-12-11 05:23:36

问题


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?


回答1:


Everything you need to know is described in the BigTIFF link posted by @cgohlke. This is just to provide an answer to your question:

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"...



来源:https://stackoverflow.com/questions/43376951/tiff-versus-bigtiff

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!