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

load: use magic number to detect image format #140

Merged
merged 1 commit into from Feb 3, 2016

Conversation

deltheil
Copy link
Collaborator

@deltheil deltheil commented Feb 3, 2016

To solve #129 and problems like soumith/imagenet-multiGPU.torch#43.

I kept the old detection via the extension, but it should never been called (except for exotic JPEG files?). Of course we can as well remove it.

UPDATE: keeping the old detection is handy precisely if someones loads a non supported format, e.g.:

> image.load("test.gif")
<image.load> unknown image type: gif

soumith added a commit that referenced this pull request Feb 3, 2016
load: use magic number to detect image format
@soumith soumith merged commit e749114 into torch:master Feb 3, 2016
@soumith
Copy link
Member

soumith commented Feb 3, 2016

Thanks. looks clean and simple.

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.

None yet

2 participants