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

Accept TGA files without the optional footer. #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jonasdeyson
Copy link
Contributor

Allow mitsuba to read TGA files without the optional footer.

@wjakob
Copy link
Member

wjakob commented May 8, 2016

I'm a bit worried that the test on the second byte might be a bit too relaxed to identify a file as TGAv1. Is there some other information in the header that could be used to be more certain?

@jonasdeyson
Copy link
Contributor Author

There are the Color map specification (field 4), and Image specification (field 5). But some of these tests are being done in Bitmap::readTGA already. So, even if we have a false positive in the proposed test, the image can still be be rejected in Bitmap::readTGA (with a different error message though).

@wjakob
Copy link
Member

wjakob commented May 9, 2016

Right -- but my message before was with regards to avoiding the false positive, which could be problematic.

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