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
bd9ded81
Kaydet (Commit)
bd9ded81
authored
Mar 14, 1998
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Logical markup.
Replace ugly {description} with a {tableii}, for the what() return values.
üst
434493b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
56 deletions
+38
-56
libimghdr.tex
Doc/lib/libimghdr.tex
+19
-28
libimghdr.tex
Doc/libimghdr.tex
+19
-28
No files found.
Doc/lib/libimghdr.tex
Dosyayı görüntüle @
bd9ded81
...
@@ -2,14 +2,13 @@
...
@@ -2,14 +2,13 @@
\label
{
module-imghdr
}
\label
{
module-imghdr
}
\stmodindex
{
imghdr
}
\stmodindex
{
imghdr
}
The
\
cod
e
{
imghdr
}
module determines the type of image contained in a
The
\
modul
e
{
imghdr
}
module determines the type of image contained in a
file or byte stream.
file or byte stream.
The
\
cod
e
{
imghdr
}
module defines the following function:
The
\
modul
e
{
imghdr
}
module defines the following function:
\setindexsubitem
{
(in module imghdr)
}
\begin{funcdesc}
{
what
}{
filename
\optional
{
\
,
h
}}
\begin{funcdesc}
{
what
}{
filename
\optional
{
, h
}}
Tests the image data contained in the file named by
\var
{
filename
}
,
Tests the image data contained in the file named by
\var
{
filename
}
,
and returns a string describing the image type. If optional
\var
{
h
}
and returns a string describing the image type. If optional
\var
{
h
}
is provided, the
\var
{
filename
}
is ignored and
\var
{
h
}
is assumed to
is provided, the
\var
{
filename
}
is ignored and
\var
{
h
}
is assumed to
...
@@ -17,35 +16,27 @@ contain the byte stream to test.
...
@@ -17,35 +16,27 @@ contain the byte stream to test.
\end{funcdesc}
\end{funcdesc}
The following image types are recognized, as listed below with the
The following image types are recognized, as listed below with the
return value from
\code
{
what
}
:
return value from
\function
{
what()
}
:
\begin{enumerate}
\begin{tableii}
{
|l|l|
}{
code
}{
Value
}{
Image format
}
\item
[``rgb'']
SGI ImgLib Files
\lineii
{
'rgb'
}{
SGI ImgLib Files
}
\lineii
{
'gif'
}{
GIF 87a and 89a Files
}
\item
[``gif'']
GIF 87a and 89a Files
\lineii
{
'pbm'
}{
Portable Bitmap Files
}
\lineii
{
'pgm'
}{
Portable Graymap Files
}
\item
[``pbm'']
Portable Bitmap Files
\lineii
{
'ppm'
}{
Portable Pixmap Files
}
\lineii
{
'tiff'
}{
TIFF Files
}
\item
[``pgm'']
Portable Graymap Files
\lineii
{
'rast'
}{
Sun Raster Files
}
\lineii
{
'xbm'
}{
X Bitmap Files
}
\item
[``ppm'']
Portable Pixmap Files
\lineii
{
'jpeg'
}{
JPEG data in JIFF format
}
\end{tableii}
\item
[``tiff'']
TIFF Files
You can extend the list of file types
\module
{
imghdr
}
can recognize by
\item
[``rast'']
Sun Raster Files
\item
[``xbm'']
X Bitmap Files
\item
[``jpeg'']
JPEG data in JIFF format
\end{enumerate}
You can extend the list of file types
\code
{
imghdr
}
can recognize by
appending to this variable:
appending to this variable:
\begin{datadesc}
{
tests
}
\begin{datadesc}
{
tests
}
A list of functions performing the individual tests. Each function
A list of functions performing the individual tests. Each function
takes two arguments: the byte-stream and an open file-like object.
takes two arguments: the byte-stream and an open file-like object.
When
\
code
{
what()
}
is called with a byte-stream, the file-like
When
\
function
{
what()
}
is called with a byte-stream, the file-like
object will be
\code
{
None
}
.
object will be
\code
{
None
}
.
The test function should return a string describing the image type if
The test function should return a string describing the image type if
...
...
Doc/libimghdr.tex
Dosyayı görüntüle @
bd9ded81
...
@@ -2,14 +2,13 @@
...
@@ -2,14 +2,13 @@
\label
{
module-imghdr
}
\label
{
module-imghdr
}
\stmodindex
{
imghdr
}
\stmodindex
{
imghdr
}
The
\
cod
e
{
imghdr
}
module determines the type of image contained in a
The
\
modul
e
{
imghdr
}
module determines the type of image contained in a
file or byte stream.
file or byte stream.
The
\
cod
e
{
imghdr
}
module defines the following function:
The
\
modul
e
{
imghdr
}
module defines the following function:
\setindexsubitem
{
(in module imghdr)
}
\begin{funcdesc}
{
what
}{
filename
\optional
{
\
,
h
}}
\begin{funcdesc}
{
what
}{
filename
\optional
{
, h
}}
Tests the image data contained in the file named by
\var
{
filename
}
,
Tests the image data contained in the file named by
\var
{
filename
}
,
and returns a string describing the image type. If optional
\var
{
h
}
and returns a string describing the image type. If optional
\var
{
h
}
is provided, the
\var
{
filename
}
is ignored and
\var
{
h
}
is assumed to
is provided, the
\var
{
filename
}
is ignored and
\var
{
h
}
is assumed to
...
@@ -17,35 +16,27 @@ contain the byte stream to test.
...
@@ -17,35 +16,27 @@ contain the byte stream to test.
\end{funcdesc}
\end{funcdesc}
The following image types are recognized, as listed below with the
The following image types are recognized, as listed below with the
return value from
\code
{
what
}
:
return value from
\function
{
what()
}
:
\begin{enumerate}
\begin{tableii}
{
|l|l|
}{
code
}{
Value
}{
Image format
}
\item
[``rgb'']
SGI ImgLib Files
\lineii
{
'rgb'
}{
SGI ImgLib Files
}
\lineii
{
'gif'
}{
GIF 87a and 89a Files
}
\item
[``gif'']
GIF 87a and 89a Files
\lineii
{
'pbm'
}{
Portable Bitmap Files
}
\lineii
{
'pgm'
}{
Portable Graymap Files
}
\item
[``pbm'']
Portable Bitmap Files
\lineii
{
'ppm'
}{
Portable Pixmap Files
}
\lineii
{
'tiff'
}{
TIFF Files
}
\item
[``pgm'']
Portable Graymap Files
\lineii
{
'rast'
}{
Sun Raster Files
}
\lineii
{
'xbm'
}{
X Bitmap Files
}
\item
[``ppm'']
Portable Pixmap Files
\lineii
{
'jpeg'
}{
JPEG data in JIFF format
}
\end{tableii}
\item
[``tiff'']
TIFF Files
You can extend the list of file types
\module
{
imghdr
}
can recognize by
\item
[``rast'']
Sun Raster Files
\item
[``xbm'']
X Bitmap Files
\item
[``jpeg'']
JPEG data in JIFF format
\end{enumerate}
You can extend the list of file types
\code
{
imghdr
}
can recognize by
appending to this variable:
appending to this variable:
\begin{datadesc}
{
tests
}
\begin{datadesc}
{
tests
}
A list of functions performing the individual tests. Each function
A list of functions performing the individual tests. Each function
takes two arguments: the byte-stream and an open file-like object.
takes two arguments: the byte-stream and an open file-like object.
When
\
code
{
what()
}
is called with a byte-stream, the file-like
When
\
function
{
what()
}
is called with a byte-stream, the file-like
object will be
\code
{
None
}
.
object will be
\code
{
None
}
.
The test function should return a string describing the image type if
The test function should return a string describing the image type if
...
...
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