Valid and well-formed TIFF's with scanline corruption
The issue page describes the problem as (essentially) TIFF files being unusable, despite being "validated" by tools like JHOVE.
Relevant "issues" page.|http://wiki.opf-labs.org/display/SPR/Valid+and+well-formed+TIFF%27s+with+scanline+corruption]
A lot of time was spent investigating the details of the file structure, for the images which could not be opened; which ultimately was a dead-end.
Eventually, we realised that the images were claiming to be 16-bit greyscale, but in fact, were actualy 8-bit greyscale. (Which, in retrospect, should have been more obvious, based on the rare error messages tools would give us.)
This meant that detection/correction suddenly became a lot easier: check for a discrepancy between image dimension and bit-depth, and the actual file size. (See below.) Similarly, because the pixel data was actually correct, we can correct the images by setting the correct value for the "BitsPerSample" tag.
- Important takeaways