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 is not valid #127

Open
dc6c opened this issue May 31, 2022 · 4 comments
Open

TIFF is not valid #127

dc6c opened this issue May 31, 2022 · 4 comments

Comments

@dc6c
Copy link

dc6c commented May 31, 2022

TIFF added in #86 is not entirely valid, and both libtiff and ImageMagick complain about it.

$ tiffinfo tiff.tif
TIFFReadDirectory: Warning, TIFF directory is missing required "StripByteCounts" field, calculating from imagelength.
$ magick identify tiff.tif
identify: TIFF directory is missing required "StripByteCounts" field, calculating from imagelength. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/956.
identify: improper image header `tiff.tif' @ error/tiff.c/ReadTIFFImage/1349.

As I read the standard, it should add the StripByteCounts field, and terminate the IFD with a zero long to indicate no more IFDs.

@git-emil
Copy link

git-emil commented Feb 17, 2023

This is what ExifTool tells about the 46 byte tiff.tif :

>exiftool -validate tiff.tif
Validate                        : 6 Warnings

When trying to add some meta data:

>exiftool -description=test tiff.tif
Error: No size tag for IFD0:StripOffsets - tiff.tif
    0 image files updated
    1 files weren't updated due to errors

@TPS
Copy link

TPS commented Feb 17, 2023

Before the PR in #86, @dmak posted in #85 that these were taken from https://stackoverflow.com/questions/42787235/smallest-possible-valid-tif-file, which hosts some more complaints about the file. Maybe a better source is needed?

@dc6c
Copy link
Author

dc6c commented Feb 17, 2023

@TPS I don't see any complaints specifically about the 46-byte TIFF in the linked SO question. ??

@TPS
Copy link

TPS commented Feb 17, 2023

What I mean is that it gives the vibes of "random guy on the Internet" on a platform that isn't suitable for publishing such. I also can't find anyone else who's even working on such a thing.

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

No branches or pull requests

3 participants