Skip to content

Don't fail if EndOfInformation is omitted - #391

Open
jasinb wants to merge 2 commits into
image-rs:mainfrom
lumidb:fix-lzw-missing-eoi
Open

jasinb wants to merge 2 commits into
image-rs:mainfrom
lumidb:fix-lzw-missing-eoi

Conversation

@jasinb

@jasinb jasinb commented May 11, 2026

Copy link
Copy Markdown

Some real-world LZW-compressed TIFFs omit the trailing EndOfInformation code (libtiff accepts this with a warning). Don't fail with UnexpectedEof in this case.

@jasinb

jasinb commented May 11, 2026

Copy link
Copy Markdown
Author

I was unsure if the correct error message should still be UnexpectedEof if we get NoProgress even with some input remaining, but I opted to keep the diff minimal. Another choice would be InvalidData or something.

@jasinb

jasinb commented May 11, 2026

Copy link
Copy Markdown
Author

The check failures seem unrelated.

@197g

197g commented Jun 12, 2026

Copy link
Copy Markdown
Member

This was likely caused by an issue in the lzw decoder that should have been fixed by #392. Do you have any test images to verify? At least I'm assuming that we do want to continue detecting streams that do not contain all necessary samples.

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 this pull request may close these issues.

2 participants