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

imghdr add openexr support #64494

Closed
mvignali mannequin opened this issue Jan 18, 2014 · 9 comments
Closed

imghdr add openexr support #64494

mvignali mannequin opened this issue Jan 18, 2014 · 9 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@mvignali
Copy link
Mannequin

mvignali mannequin commented Jan 18, 2014

BPO 20295
Nosy @bitdancer, @PCManticore, @berkerpeksag, @serhiy-storchaka
Files
  • img_hdr_exr.patch: add test_exr func to imghdr
  • img_hdr_exr_2.patch
  • img_hdr_exr_3.patch: avoid IndexError Exception.
  • issue20295.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    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'

    bugs.python.org fields:

    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']

    @mvignali
    Copy link
    Mannequin Author

    mvignali mannequin commented Jan 18, 2014

    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.

    @mvignali mvignali mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jan 18, 2014
    @mvignali
    Copy link
    Mannequin Author

    mvignali mannequin commented Jan 19, 2014

    New patch with formatting correction and documentation update.

    I'm not sure about the place of the versionadded directive in the documentation.

    @SilentGhost
    Copy link
    Mannequin

    SilentGhost mannequin commented Jan 19, 2014

    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).

    @mvignali
    Copy link
    Mannequin Author

    mvignali mannequin commented Jan 19, 2014

    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

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Jan 19, 2014

    Hi, Martin.

    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.

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Jun 19, 2014

    Here's an updated patch with a small exr test file.

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Jun 24, 2014

    This seems commit ready.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 26, 2014

    New changeset 71b9a841119a by R David Murray in branch 'default':
    bpo-20295: Teach imghdr to recognize OpenEXR format images.
    http://hg.python.org/cpython/rev/71b9a841119a

    @bitdancer
    Copy link
    Member

    bitdancer commented Jun 26, 2014

    Thanks, Martin and Claudiu.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant