Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2f60820f
Kaydet (Commit)
2f60820f
authored
Haz 26, 2014
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#20295: Teach imghdr to recognize OpenEXR format images.
Patch by Martin Vignali, test by Claudiu Popa.
üst
a157867a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
0 deletions
+20
-0
imghdr.rst
Doc/library/imghdr.rst
+5
-0
3.5.rst
Doc/whatsnew/3.5.rst
+6
-0
imghdr.py
Lib/imghdr.py
+6
-0
python.exr
Lib/test/imghdrdata/python.exr
+0
-0
test_imghdr.py
Lib/test/test_imghdr.py
+1
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/imghdr.rst
Dosyayı görüntüle @
2f60820f
...
...
@@ -50,6 +50,11 @@ from :func:`what`:
+------------+-----------------------------------+
| ``'webp'`` | WebP files |
+------------+-----------------------------------+
| ``'exr'`` | OpenEXR Files |
+------------+-----------------------------------+
.. versionadded:: 3.5
The *exr* format was added.
.. versionchanged:: 3.5
The *webp* type was added.
...
...
Doc/whatsnew/3.5.rst
Dosyayı görüntüle @
2f60820f
...
...
@@ -141,6 +141,12 @@ doctest
*module* contains no docstrings instead of raising :exc:`ValueError`
(contributed by Glenn Jones in :issue:`15916`).
imghdr
------
* :func:`~imghdr.what` now recognizes the `OpenEXR <http://www.openexr.com>`_
format (contributed by Martin vignali and Cladui Popa in :issue:`20295`).
importlib
---------
...
...
Lib/imghdr.py
Dosyayı görüntüle @
2f60820f
...
...
@@ -116,6 +116,12 @@ def test_webp(h, f):
tests
.
append
(
test_webp
)
def
test_exr
(
h
,
f
):
if
h
.
startswith
(
b
'
\x76\x2f\x31\x01
'
):
return
'exr'
tests
.
append
(
test_exr
)
#--------------------#
# Small test program #
#--------------------#
...
...
Lib/test/imghdrdata/python.exr
0 → 100644
Dosyayı görüntüle @
2f60820f
File added
Lib/test/test_imghdr.py
Dosyayı görüntüle @
2f60820f
...
...
@@ -18,6 +18,7 @@ TEST_FILES = (
(
'python.tiff'
,
'tiff'
),
(
'python.xbm'
,
'xbm'
),
(
'python.webp'
,
'webp'
),
(
'python.exr'
,
'exr'
),
)
class
UnseekableIO
(
io
.
FileIO
):
...
...
Misc/NEWS
Dosyayı görüntüle @
2f60820f
...
...
@@ -103,6 +103,8 @@ Core and Builtins
Library
-------
- Issue #20295: imghdr now recognizes OpenEXR format images.
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing. Patch by Claudiu Popa.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment