Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIFF IFD concatenations/removals output images that fail JHOVE validation check for value offset word-alignment #51

Closed
fiendish opened this issue Jul 16, 2021 · 4 comments · Fixed by #52

Comments

@fiendish
Copy link

fiendish commented Jul 16, 2021

(https://jhove.openpreservation.org/modules/tiff/)

> python -c 'import tifftools;tifftools.tiff_concat(["good1.svs", "good2.svs"], "out.svs", overwrite=True)'
> jhove -m TIFF-hul out.svs

Jhove (Rel. 1.24.1, 2020-03-16)
 Date: 2021-07-15 20:14:30 MDT
 RepresentationInformation: out.svs
  ReportingModule: TIFF-hul, Rel. 1.9.2 (2019-12-10)
  LastModified: 2021-07-15 20:14:20 MDT
  Size: 875685820
  Format: TIFF
  Status: Not well-formed
  SignatureMatches:
   TIFF-hul
  ErrorMessage: Value offset not word-aligned: 8842289
   ID: TIFF-HUL-4
   Offset: 8858224
  MIMEtype: image/tiff

https://web.archive.org/web/20160324105748/https://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf on page 15 (about IFD entries) says:

Bytes 8-11 The Value Offset, the file offset (in bytes) of the Value for the field. The Value is expected to begin on a word boundary; the correspond- ing Value Offset will thus be an even number. This file offset may point anywhere in the file, even after the image data.

@fiendish fiendish changed the title TIFF IFD modifications output images that fail JHOVE validation check for offset word-alignment TIFF IFD concatenations/removals output images that fail JHOVE validation check for offset word-alignment Jul 16, 2021
@fiendish fiendish changed the title TIFF IFD concatenations/removals output images that fail JHOVE validation check for offset word-alignment TIFF IFD concatenations/removals output images that fail JHOVE validation check for value offset word-alignment Jul 16, 2021
manthey added a commit that referenced this issue Jul 16, 2021
manthey added a commit that referenced this issue Jul 16, 2021
@manthey
Copy link
Contributor

manthey commented Jul 16, 2021

@fiendish Thank you for reporting this.

manthey added a commit that referenced this issue Jul 16, 2021
@fiendish
Copy link
Author

fiendish commented Jul 16, 2021

I'm still getting the error after the change.

Test input (1.85 MB): http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1-Small-Region.svs

> python -c 'import tifftools;tifftools.tiff_concat(["CMU-1-Small-Region.svs", "CMU-1-Small-Region.svs"], "out.svs", overwrite=True)'
> jhove -m TIFF-hul out.svs

Jhove (Rel. 1.24.1, 2020-03-16)
 Date: 2021-07-16 11:24:53 MDT
 RepresentationInformation: out.svs
  ReportingModule: TIFF-hul, Rel. 1.9.2 (2019-12-10)
  LastModified: 2021-07-16 11:23:01 MDT
  Size: 3877884
  Format: TIFF
  Status: Not well-formed
  SignatureMatches:
   TIFF-hul
  ErrorMessage: Value offset not word-aligned: 1276569
   ID: TIFF-HUL-4
   Offset: 1278040
  MIMEtype: image/tiff

@manthey
Copy link
Contributor

manthey commented Jul 16, 2021

@fiendish Try again.

@fiendish
Copy link
Author

Looks great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants