Plugin reference¶
BmpImagePlugin
Module¶
-
class
PIL.BmpImagePlugin.
BmpImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
Image plugin for the Windows Bitmap format (BMP)
-
BITFIELDS
= 3¶
-
COMPRESSIONS
= {'BITFIELDS': 3, 'JPEG': 4, 'PNG': 5, 'RAW': 0, 'RLE4': 2, 'RLE8': 1}¶
-
JPEG
= 4¶
-
PNG
= 5¶
-
RAW
= 0¶
-
RLE4
= 2¶
-
RLE8
= 1¶
-
format
= 'BMP'¶
-
format_description
= 'Windows Bitmap'¶
-
-
class
PIL.BmpImagePlugin.
DibImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.BmpImagePlugin.BmpImageFile
-
format
= 'DIB'¶
-
format_description
= 'Windows Bitmap'¶
-
BufrStubImagePlugin
Module¶
CurImagePlugin
Module¶
-
class
PIL.CurImagePlugin.
CurImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.BmpImagePlugin.BmpImageFile
-
format
= 'CUR'¶
-
format_description
= 'Windows Cursor'¶
-
DcxImagePlugin
Module¶
-
class
PIL.DcxImagePlugin.
DcxImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.PcxImagePlugin.PcxImageFile
-
format
= 'DCX'¶
-
format_description
= 'Intel DCX'¶
-
is_animated
¶
-
n_frames
¶
-
seek
(frame)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-
EpsImagePlugin
Module¶
-
class
PIL.EpsImagePlugin.
EpsImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
EPS File Parser for the Python Imaging Library
-
format
= 'EPS'¶
-
format_description
= 'Encapsulated Postscript'¶
-
mode_map
= {1: 'L', 2: 'LAB', 3: 'RGB'}¶
-
FitsStubImagePlugin
Module¶
FliImagePlugin
Module¶
-
class
PIL.FliImagePlugin.
FliImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
-
format
= 'FLI'¶
-
format_description
= 'Autodesk FLI/FLC Animation'¶
-
is_animated
¶
-
n_frames
¶
-
seek
(frame)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-
FpxImagePlugin
Module¶
GbrImagePlugin
Module¶
GifImagePlugin
Module¶
-
class
PIL.GifImagePlugin.
GifImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
-
format
= 'GIF'¶
-
format_description
= 'Compuserve GIF'¶
-
global_palette
= None¶
-
is_animated
¶
-
n_frames
¶
-
seek
(frame)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-
GribStubImagePlugin
Module¶
Hdf5StubImagePlugin
Module¶
IcnsImagePlugin
Module¶
-
class
PIL.IcnsImagePlugin.
IcnsFile
(fobj)[源代码]¶ 基类:
object
-
SIZES
= {(16, 16, 1): [(b'icp4', <function read_png_or_jpeg2000>), (b'is32', <function read_32>), (b's8mk', <function read_mk>)], (16, 16, 2): [(b'ic11', <function read_png_or_jpeg2000>)], (32, 32, 1): [(b'icp5', <function read_png_or_jpeg2000>), (b'il32', <function read_32>), (b'l8mk', <function read_mk>)], (32, 32, 2): [(b'ic12', <function read_png_or_jpeg2000>)], (48, 48, 1): [(b'ih32', <function read_32>), (b'h8mk', <function read_mk>)], (64, 64, 1): [(b'icp6', <function read_png_or_jpeg2000>)], (128, 128, 1): [(b'ic07', <function read_png_or_jpeg2000>), (b'it32', <function read_32t>), (b't8mk', <function read_mk>)], (128, 128, 2): [(b'ic13', <function read_png_or_jpeg2000>)], (256, 256, 1): [(b'ic08', <function read_png_or_jpeg2000>)], (256, 256, 2): [(b'ic14', <function read_png_or_jpeg2000>)], (512, 512, 1): [(b'ic09', <function read_png_or_jpeg2000>)], (512, 512, 2): [(b'ic10', <function read_png_or_jpeg2000>)]}¶
-
-
class
PIL.IcnsImagePlugin.
IcnsImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
PIL image support for Mac OS .icns files. Chooses the best resolution, but will possibly load a different size image if you mutate the size attribute before calling ‘load’.
The info dictionary has a key ‘sizes’ that is a list of sizes that the icns file has.
-
format
= 'ICNS'¶
-
format_description
= 'Mac OS icns resource'¶
-
IcoImagePlugin
Module¶
-
class
PIL.IcoImagePlugin.
IcoImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
PIL read-only image support for Microsoft Windows .ico files.
By default the largest resolution image in the file will be loaded. This can be changed by altering the ‘size’ attribute before calling ‘load’.
The info dictionary has a key ‘sizes’ that is a list of the sizes available in the icon file.
Handles classic, XP and Vista icon formats.
This plugin is a refactored version of Win32IconImagePlugin by Bryan Davis <casadebender@gmail.com>. https://code.google.com/archive/p/casadebender/wikis/Win32IconImagePlugin.wiki
-
format
= 'ICO'¶
-
format_description
= 'Windows Icon'¶
-
ImImagePlugin
Module¶
-
class
PIL.ImImagePlugin.
ImImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
-
format
= 'IM'¶
-
format_description
= 'IFUNC Image Memory'¶
-
is_animated
¶
-
n_frames
¶
-
seek
(frame)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-
ImtImagePlugin
Module¶
IptcImagePlugin
Module¶
JpegImagePlugin
Module¶
Jpeg2KImagePlugin
Module¶
McIdasImagePlugin
Module¶
MicImagePlugin
Module¶
MspImagePlugin
Module¶
PalmImagePlugin
Module¶
PcdImagePlugin
Module¶
PcxImagePlugin
Module¶
PdfImagePlugin
Module¶
PixarImagePlugin
Module¶
PngImagePlugin
Module¶
-
PIL.PngImagePlugin.
getchunks
(im, **params)[源代码]¶ Return a list of PNG chunks representing this image.
-
PIL.PngImagePlugin.
is_cid
()¶ Matches zero or more characters at the beginning of the string.
-
class
PIL.PngImagePlugin.
PngImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
-
format
= 'PNG'¶
-
format_description
= 'Portable network graphics'¶
-
load_end
()[源代码] internal: finished reading image data
-
load_prepare
()[源代码] internal: prepare to read PNG file
-
load_read
(read_bytes)[源代码] internal: read more image data
-
verify
()[源代码] Verify PNG file
-
PpmImagePlugin
Module¶
PsdImagePlugin
Module¶
-
class
PIL.PsdImagePlugin.
PsdImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
-
format
= 'PSD'¶
-
format_description
= 'Adobe Photoshop'¶
-
is_animated
¶
-
n_frames
¶
-
seek
(layer)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-
SgiImagePlugin
Module¶
SpiderImagePlugin
Module¶
-
class
PIL.SpiderImagePlugin.
SpiderImageFile
(fp=None, filename=None)[源代码]¶ 基类:
PIL.ImageFile.ImageFile
-
format
= 'SPIDER'¶
-
format_description
= 'Spider 2D image'¶
-
is_animated
¶
-
n_frames
¶
-
seek
(frame)[源代码]¶ Seeks to the given frame in this sequence file. If you seek beyond the end of the sequence, the method raises an EOFError exception. When a sequence file is opened, the library automatically seeks to frame 0.
Note that in the current version of the library, most sequence formats only allows you to seek to the next frame.
See
tell()
.参数: frame – Frame number, starting at 0. 引发: EOFError – If the call attempts to seek beyond the end of the sequence.
-