We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2014-06-26.16:30:03.322>
created_at = <Date 2014-01-18.18:45:46.150>
labels = ['type-feature', 'library']
title = 'imghdr add openexr support'
updated_at = <Date 2014-06-26.16:30:03.321>
user = 'https://bugs.python.org/mvignali'
activity = <Date 2014-06-26.16:30:03.321>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2014-06-26.16:30:03.322>
closer = 'r.david.murray'
components = ['Library (Lib)']
creation = <Date 2014-01-18.18:45:46.150>
creator = 'mvignali'
dependencies = 
files = ['33531', '33547', '33554', '35692']
hgrepos = 
issue_num = 20295
keywords = ['patch']
message_count = 9.0
messages = ['208409', '208467', '208472', '208498', '208499', '220991', '221485', '221616', '221617']
nosy_count = 7.0
nosy_names = ['r.david.murray', 'SilentGhost', 'Claudiu.Popa', 'python-dev', 'berker.peksag', 'serhiy.storchaka', 'mvignali']
pr_nums = 
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue20295'
versions = ['Python 3.5']
The text was updated successfully, but these errors were encountered:
Add support for detect openexr file (http://www.openexr.com/)
Based on information provided by : http://www.openexr.com/ReadingAndWritingImageFiles.pdf
I make some tests, on different kind of exr file, to check, the new function.
Sorry, something went wrong.
New patch with formatting correction and documentation update.
I'm not sure about the place of the versionadded directive in the documentation.
Martin, it would be better if you do the check the way it's done in test_rast: h.startswith(b'\x76\x2f\x31\x01')
Otherwise, you need to check that that h has at least 4 elements (if it doesn't you'll get an IndexError).
You're right, i make the correction, in a new patch.
I make other tests, with official sample files : http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.4.0.tar.gz
Please see bpo-19990, which tries to add unit tests for imghdr module. It would be nice if you could expand on it with an exr file, for your use case.
Here's an updated patch with a small exr test file.
This seems commit ready.
New changeset 71b9a841119a by R David Murray in branch 'default':
bpo-20295: Teach imghdr to recognize OpenEXR format images.
Thanks, Martin and Claudiu.
No branches or pull requests