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
97db05de
Kaydet (Commit)
97db05de
authored
Ock 07, 2005
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF #75103: imghdr -- identify JPEGs in EXIF format
üst
dd3e6cb2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
libimghdr.tex
Doc/lib/libimghdr.tex
+3
-1
imghdr.py
Lib/imghdr.py
+7
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/lib/libimghdr.tex
Dosyayı görüntüle @
97db05de
...
...
@@ -31,11 +31,13 @@ return value from \function{what()}:
\lineii
{
'tiff'
}{
TIFF Files
}
\lineii
{
'rast'
}{
Sun Raster Files
}
\lineii
{
'xbm'
}{
X Bitmap Files
}
\lineii
{
'jpeg'
}{
JPEG data in JFIF
format
}
\lineii
{
'jpeg'
}{
JPEG data in JFIF
or Exif formats
}
\lineii
{
'bmp'
}{
BMP files
}
\lineii
{
'png'
}{
Portable Network Graphics
}
\end{tableii}
\versionadded
[Exif detection]
{
2.5
}
You can extend the list of file types
\module
{
imghdr
}
can recognize by
appending to this variable:
...
...
Lib/imghdr.py
Dosyayı görüntüle @
97db05de
...
...
@@ -101,6 +101,13 @@ def test_jpeg(h, f):
tests
.
append
(
test_jpeg
)
def
test_exif
(
h
,
f
):
"""JPEG data in Exif format"""
if
h
[
6
:
10
]
==
'Exif'
:
return
'jpeg'
tests
.
append
(
test_exif
)
def
test_bmp
(
h
,
f
):
if
h
[:
2
]
==
'BM'
:
return
'bmp'
...
...
Misc/NEWS
Dosyayı görüntüle @
97db05de
...
...
@@ -33,6 +33,8 @@ Extension Modules
Library
-------
- The imghdr module now detects Exif files.
- StringIO.truncate() now correctly adjusts the size attribute.
(Bug #951915).
...
...
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