Solving TIFF malformation using exiftool

Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History
Title

Solving TIFF malformation using exiftool

Detailed description

The issue page describes the problem as (essentially): TIFF files being unusable, despite being "validated" by tools like JHOVE.

Solution Champion

aamato

Corresponding Issue(s)

Relevant "issues" page.

Solution details

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 questions and takeaways (see slides below)
  • What does "valid" mean for a file?
    • Well-formed?
    • Verified externally by a tool?
    • Matching a spec?
    • Internally consistent?
  • What do we learn from this?
    • Don't always assume your vendors/digitisers are doing the job right.
    • Don't always assume that "successful validation" is meaningful. (Also: learn the limitations of your tools.)
    • The only thing better than double-checking is triple-checking.
    • KNOW WHAT YOU ARE "PRESERVING"!
Tool Registry Link

ExifTool

Evaluation

???

Slides from final day (images/PPT)

This was the starting point:

This was where we want to be:

So what did we do to get there?

We moved one bit!

One bit makes a big difference:

Raising questions about "valid":

So how can we not have to do this again? We can use `exiftool` to evaluate the relevant properties of the TIFF images, and flag up an inconsistency:

And exiftool also let's us fix the problem:

What do we learn?

Also: Consequences of bit-rot _can_ be severe!

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.