Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed issue with BigTiff vs non-BigTiff offset value packing #2247
The TIFF Spec has a condition that is an optimization, but has caused a lot of issues.
A TIFF-tag is structured like
If the value of the data is a small size, the value can be packed into the space that stores the offset. In this way, the tiff tag reads as
For BigTiff, the offset field is an 8-byte wide
This PR fixes this. The architecture of how we were utilizing implicit classes to add method extensions to ByteReader for reading arrays is clever but a bit unmalleable (I might have designed it, or at least didn't change it in the past, so that's on me). The type class I introduced was the least invasive way to implement this that I could think of; perhaps not perfect but it gets the job done. It changes technically