The ImageFileDirectory is parsing an orientation, but it's getting it wrong. Early research suggests we're getting 4 bytes like: 0 0 0 6. We're reading a 2-byte short from the first two bytes, so we get back 0. If we read the last two bytes we get 6 (the correct value).
We need to read up on parsing and see if all shorts are similarly broken.
The ImageFileDirectory is parsing an orientation, but it's getting it wrong. Early research suggests we're getting 4 bytes like:
0 0 0 6. We're reading a 2-byte short from the first two bytes, so we get back 0. If we read the last two bytes we get 6 (the correct value).We need to read up on parsing and see if all shorts are similarly broken.