This PR addresses a problem with the previous version where only frank errors from the tifffile module caused a file to be marked invalid, but warnings like bad block offsets were ignored. The new version causes files that cause warnings to be marked invalid. It does so by the ugly hack of monkey-patching the routine tifffile uses to log warnings so that it raises an exception instead. That exception is caught by the validator and the file is marked invalid.
This PR addresses a problem with the previous version where only frank errors from the tifffile module caused a file to be marked invalid, but warnings like bad block offsets were ignored. The new version causes files that cause warnings to be marked invalid. It does so by the ugly hack of monkey-patching the routine tifffile uses to log warnings so that it raises an exception instead. That exception is caught by the validator and the file is marked invalid.