File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ from :func:`what`:
5050+------------+-----------------------------------+
5151| ``'webp' `` | WebP files |
5252+------------+-----------------------------------+
53+ | ``'exr' `` | OpenEXR Files |
54+ +------------+-----------------------------------+
55+
56+ .. versionadded :: 3.5
57+ The *exr * format was added.
5358
5459.. versionchanged :: 3.5
5560 The *webp * type was added.
Original file line number Diff line number Diff line change @@ -141,6 +141,12 @@ doctest
141141 *module * contains no docstrings instead of raising :exc: `ValueError `
142142 (contributed by Glenn Jones in :issue: `15916 `).
143143
144+ imghdr
145+ ------
146+
147+ * :func: `~imghdr.what ` now recognizes the `OpenEXR <http://www.openexr.com >`_
148+ format (contributed by Martin vignali and Cladui Popa in :issue: `20295 `).
149+
144150importlib
145151---------
146152
Original file line number Diff line number Diff line change @@ -116,6 +116,12 @@ def test_webp(h, f):
116116
117117tests .append (test_webp )
118118
119+ def test_exr (h , f ):
120+ if h .startswith (b'\x76 \x2f \x31 \x01 ' ):
121+ return 'exr'
122+
123+ tests .append (test_exr )
124+
119125#--------------------#
120126# Small test program #
121127#--------------------#
Original file line number Diff line number Diff line change 1818 ('python.tiff' , 'tiff' ),
1919 ('python.xbm' , 'xbm' ),
2020 ('python.webp' , 'webp' ),
21+ ('python.exr' , 'exr' ),
2122)
2223
2324class UnseekableIO (io .FileIO ):
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ Core and Builtins
103103Library
104104-------
105105
106+ - Issue #20295: imghdr now recognizes OpenEXR format images.
107+
106108- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
107109 files closing. Patch by Claudiu Popa.
108110
You can’t perform that action at this time.
0 commit comments