- Plugin reference
- BmpImagePlugin Module
- BufrStubImagePlugin Module
- CurImagePlugin Module
- DcxImagePlugin Module
- EpsImagePlugin Module
- FitsStubImagePlugin Module
- FliImagePlugin Module
- FpxImagePlugin Module
- GbrImagePlugin Module
- GifImagePlugin Module
- GribStubImagePlugin Module
- Hdf5StubImagePlugin Module
- IcnsImagePlugin Module
- IcoImagePlugin Module
- ImImagePlugin Module
- ImtImagePlugin Module
- IptcImagePlugin Module
- JpegImagePlugin Module
- Jpeg2KImagePlugin Module
- McIdasImagePlugin Module
- MicImagePlugin Module
- MpegImagePlugin Module
- MspImagePlugin Module
- PalmImagePlugin Module
- PcdImagePlugin Module
- PcxImagePlugin Module
- PdfImagePlugin Module
- PixarImagePlugin Module
- PngImagePlugin Module
- PpmImagePlugin Module
- PsdImagePlugin Module
- SgiImagePlugin Module
- SpiderImagePlugin Module
- SunImagePlugin Module
- TgaImagePlugin Module
- TiffImagePlugin Module
- WebPImagePlugin Module
- WmfImagePlugin Module
- XVThumbImagePlugin Module
- XbmImagePlugin Module
- XpmImagePlugin Module
Plugin reference
BmpImagePlugin Module
- class
PIL.BmpImagePlugin.
BmpImageFile
(fp=None, filename=None)[源代码] - 基类:
PIL.ImageFile.ImageFile
Image plugin for the Windows Bitmap format (BMP)
BITFIELDS
= 3COMPRESSIONS
= {'BITFIELDS': 3, 'JPEG': 4, 'PNG': 5, 'RAW': 0, 'RLE4': 2, 'RLE8': 1}JPEG
= 4PNG
= 5RAW
= 0RLE4
= 2RLE8
= 1format
= 'BMP'formatdescription
= 'Windows Bitmap'_
- class
PIL.BmpImagePlugin.
DibImageFile
(fp=None, filename=None)[源代码]
BufrStubImagePlugin Module
- class
PIL.BufrStubImagePlugin.
BufrStubImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.StubImageFile
PIL.BufrStubImagePlugin.
registerhandler
(_handler)[源代码]- Install application-specific BUFR image handler.
参数:handler – Handler object.
CurImagePlugin Module
- class
PIL.CurImagePlugin.
CurImageFile
(fp=None, filename=None)[源代码]
DcxImagePlugin Module
- class
PIL.DcxImagePlugin.
DcxImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.PcxImagePlugin.PcxImageFile
format
= 'DCX'formatdescription
= 'Intel DCX'_is_animated
n_frames
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
EpsImagePlugin Module
- class
PIL.EpsImagePlugin.
EpsImageFile
(fp=None, filename=None)[源代码] - 基类:
PIL.ImageFile.ImageFile
EPS File Parser for the Python Imaging Library
format
= 'EPS'formatdescription
= 'Encapsulated Postscript'_load
(scale=1)[源代码]Load image data based on tile list
loadseek
(args, *kwargs_)[源代码]modemap
= {1: 'L', 2: 'LAB', 3: 'RGB', 4: 'CMYK'}_
PIL.EpsImagePlugin.
Ghostscript
(tile, size, fp, scale=1)[源代码]- Render an image using Ghostscript
- class
PIL.EpsImagePlugin.
PSFile
(fp)[源代码] - 基类:
object
Wrapper for bytesio object that treats either CR or LF as end of line.
PIL.EpsImagePlugin.
has_ghostscript
()[源代码]
FitsStubImagePlugin Module
- class
PIL.FitsStubImagePlugin.
FITSStubImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.StubImageFile
PIL.FitsStubImagePlugin.
registerhandler
(_handler)[源代码]- Install application-specific FITS image handler.
参数:handler – Handler object.
FliImagePlugin Module
- class
PIL.FliImagePlugin.
FliImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'FLI'formatdescription
= 'Autodesk FLI/FLC Animation'_is_animated
n_frames
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
FpxImagePlugin Module
GbrImagePlugin Module
- class
PIL.GbrImagePlugin.
GbrImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'GBR'formatdescription
= 'GIMP brush file'_load
()[源代码]- Load image data based on tile list
GifImagePlugin Module
- class
PIL.GifImagePlugin.
GifImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
data
()[源代码]format
= 'GIF'formatdescription
= 'Compuserve GIF'_globalpalette
= None_is_animated
load_end
()[源代码]n_frames
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
PIL.GifImagePlugin.
getinterlace
(_im)[源代码]
PIL.GifImagePlugin.
getdata
(im, offset=(0, 0), **params)[源代码]- Legacy Method
Return a list of strings representing this image.The first string is a local image header, the rest containsencoded image data.
参数:
- im – Image object
- offset – Tuple of (x, y) pixels. Defaults to (0,0)
- **params – E.g. duration or other encoder info parameters返回:
List of Bytes containing gif encoded frame data
PIL.GifImagePlugin.
getheader
(im, palette=None, info=None)[源代码]- Legacy Method to get Gif data from image.
Warning:: May modify image data.
参数:
- im – Image object
- palette – bytes object containing the source palette, or ….
- info – encoderinfo返回:
tuple of(list of header items, optimized palette)
GribStubImagePlugin Module
- class
PIL.GribStubImagePlugin.
GribStubImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.StubImageFile
PIL.GribStubImagePlugin.
registerhandler
(_handler)[源代码]- Install application-specific GRIB image handler.
参数:handler – Handler object.
Hdf5StubImagePlugin Module
- class
PIL.Hdf5StubImagePlugin.
HDF5StubImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.StubImageFile
PIL.Hdf5StubImagePlugin.
registerhandler
(_handler)[源代码]- Install application-specific HDF5 image handler.
参数:handler – Handler object.
IcnsImagePlugin Module
- class
PIL.IcnsImagePlugin.
IcnsFile
(fobj)[源代码] 基类:
object
SIZES
= {(16, 16, 1): [(b'icp4',), (b'is32', ), (b's8mk', )], (16, 16, 2): [(b'ic11', )], (32, 32, 1): [(b'icp5', ), (b'il32', ), (b'l8mk', )], (32, 32, 2): [(b'ic12', )], (48, 48, 1): [(b'ih32', ), (b'h8mk', )], (64, 64, 1): [(b'icp6', )], (128, 128, 1): [(b'ic07', ), (b'it32', ), (b't8mk', )], (128, 128, 2): [(b'ic13', )], (256, 256, 1): [(b'ic08', )], (256, 256, 2): [(b'ic14', )], (512, 512, 1): [(b'ic09', )], (512, 512, 2): [(b'ic10', )]} bestsize
()[源代码]dataforsize
(size)[源代码]Get an icon resource as {channel: array}. Note thatthe arrays are bottom-up like windows bitmaps and will likelyneed to be flipped or transposed in some way.
getimage
(size=None)[源代码]itersizes
()[源代码]
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 loada different size image if you mutate the size attributebefore calling ‘load’.
The info dictionary has a key ‘sizes’ that is a listof sizes that the icns file has.
format
= 'ICNS'formatdescription
= 'Mac OS icns resource'_load
()[源代码]Load image data based on tile list
PIL.IcnsImagePlugin.
nextheader
(fobj)[源代码]
PIL.IcnsImagePlugin.
read32
(_fobj, start_length, size)[源代码]- Read a 32bit RGB icon resource. Seems to be either uncompressed oran RLE packbits-like scheme.
PIL.IcnsImagePlugin.
read32t
(_fobj, start_length, size)[源代码]
PIL.IcnsImagePlugin.
readmk
(_fobj, start_length, size)[源代码]
PIL.IcnsImagePlugin.
readpng_or_jpeg2000
(_fobj, start_length, size)[源代码]
IcoImagePlugin Module
- class
PIL.IcoImagePlugin.
IcoFile
(buf)[源代码] 基类:
object
- 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. Thiscan be changed by altering the ‘size’ attribute before calling ‘load’.
The info dictionary has a key ‘sizes’ that is a list of the sizes availablein 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'formatdescription
= 'Windows Icon'_load
()[源代码]Load image data based on tile list
load_seek
()[源代码]size
ImImagePlugin Module
- class
PIL.ImImagePlugin.
ImImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'IM'formatdescription
= 'IFUNC Image Memory'_is_animated
n_frames
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
PIL.ImImagePlugin.
number
(s)[源代码]
ImtImagePlugin Module
- class
PIL.ImtImagePlugin.
ImtImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
IptcImagePlugin Module
- class
PIL.IptcImagePlugin.
IptcImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PIL.IptcImagePlugin.
dump
(c)[源代码]
PIL.IptcImagePlugin.
getiptcinfo
(im)[源代码]- Get IPTC information from TIFF, JPEG, or IPTC file.
参数:im – An image containing IPTC data.返回:A dictionary containing IPTC information, or None ifno IPTC information block was found.
PIL.IptcImagePlugin.
i
(c)[源代码]
JpegImagePlugin Module
PIL.JpegImagePlugin.
APP
(self, marker)[源代码]
PIL.JpegImagePlugin.
COM
(self, marker)[源代码]
PIL.JpegImagePlugin.
DQT
(self, marker)[源代码]
- class
PIL.JpegImagePlugin.
JpegImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PIL.JpegImagePlugin.
SOF
(self, marker)[源代码]
PIL.JpegImagePlugin.
Skip
(self, marker)[源代码]
PIL.JpegImagePlugin.
convertdict_qtables
(_qtables)[源代码]
PIL.JpegImagePlugin.
getsampling
(_im)[源代码]
PIL.JpegImagePlugin.
jpegfactory
(_fp=None, filename=None)[源代码]
Jpeg2KImagePlugin Module
- class
PIL.Jpeg2KImagePlugin.
Jpeg2KImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'JPEG2000'formatdescription
= 'JPEG 2000 (ISO 15444)'_load
()[源代码]- Load image data based on tile list
McIdasImagePlugin Module
- class
PIL.McIdasImagePlugin.
McIdasImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
MicImagePlugin Module
MpegImagePlugin Module
- class
PIL.MpegImagePlugin.
BitStream
(fp)[源代码] 基类:
object
- class
PIL.MpegImagePlugin.
MpegImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
MspImagePlugin Module
- class
PIL.MspImagePlugin.
MspDecoder
(mode, *args)[源代码] -
decode
(buffer)[源代码]- Override to perform the decoding process.
参数:buffer – A bytes object with the data to be decoded.If handles_eof is set, then buffer will be empty and self.fd_will be set.返回:A tuple of (bytes consumed, errcode).If finished with decoding return <0 for the bytes consumed.Err codes are from _ERRORS
- class
PIL.MspImagePlugin.
MspImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PalmImagePlugin Module
PIL.PalmImagePlugin.
build_prototype_image
()[源代码]
PcdImagePlugin Module
- class
PIL.PcdImagePlugin.
PcdImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'PCD'formatdescription
= 'Kodak PhotoCD'_load_end
()[源代码]
PcxImagePlugin Module
- class
PIL.PcxImagePlugin.
PcxImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PdfImagePlugin Module
PixarImagePlugin Module
- class
PIL.PixarImagePlugin.
PixarImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PngImagePlugin Module
- class
PIL.PngImagePlugin.
PngImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PIL.PngImagePlugin.
getchunks
(im, **params)[源代码]- Return a list of PNG chunks representing this image.
PIL.PngImagePlugin.
putchunk
(fp, cid, *data)[源代码]- Write a PNG chunk (including CRC field)
- class
PIL.PngImagePlugin.
ChunkStream
(fp)[源代码] 基类:
object
call
(cid, pos, length)[源代码]Call the appropriate chunk handler
close
()[源代码]crc
(cid, data)[源代码]Read and verify checksum
crcskip
(_cid, data)[源代码]Read checksum. Used if the C module is not present
push
(cid, pos, length)[源代码]read
()[源代码]Fetch a new chunk. Returns header information.
verify
(endchunk=b'IEND')[源代码]
- class
PIL.PngImagePlugin.
PngImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
- class
PIL.PngImagePlugin.
PngStream
(fp)[源代码] 基类:
PIL.PngImagePlugin.ChunkStream
checktext_memory
(_chunklen)[源代码]chunkIDAT
(_pos, length)[源代码]chunkIEND
(_pos, length)[源代码]chunkIHDR
(_pos, length)[源代码]chunkPLTE
(_pos, length)[源代码]chunkacTL
(_pos, length)[源代码]chunkcHRM
(_pos, length)[源代码]chunkfcTL
(_pos, length)[源代码]chunkfdAT
(_pos, length)[源代码]chunkgAMA
(_pos, length)[源代码]chunkiCCP
(_pos, length)[源代码]chunkiTXt
(_pos, length)[源代码]chunkpHYs
(_pos, length)[源代码]chunksRGB
(_pos, length)[源代码]chunktEXt
(_pos, length)[源代码]chunktRNS
(_pos, length)[源代码]chunkzTXt
(_pos, length)[源代码]
PpmImagePlugin Module
- class
PIL.PpmImagePlugin.
PpmImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
PsdImagePlugin Module
- class
PIL.PsdImagePlugin.
PsdImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'PSD'formatdescription
= 'Adobe Photoshop'_is_animated
load_prepare
()[源代码]n_frames
seek
(layer)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
SgiImagePlugin Module
- class
PIL.SgiImagePlugin.
SGI16Decoder
(mode, *args)[源代码] -
decode
(buffer)[源代码]- Override to perform the decoding process.
参数:buffer – A bytes object with the data to be decoded.If handles_eof is set, then buffer will be empty and self.fd_will be set.返回:A tuple of (bytes consumed, errcode).If finished with decoding return <0 for the bytes consumed.Err codes are from _ERRORS
- class
PIL.SgiImagePlugin.
SgiImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
SpiderImagePlugin Module
- class
PIL.SpiderImagePlugin.
SpiderImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
convert2byte
(depth=255)[源代码]format
= 'SPIDER'formatdescription
= 'Spider 2D image'_is_animated
n_frames
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
tkPhotoImage
()[源代码]
PIL.SpiderImagePlugin.
isInt
(f)[源代码]
PIL.SpiderImagePlugin.
isSpiderHeader
(t)[源代码]
PIL.SpiderImagePlugin.
isSpiderImage
(filename)[源代码]
PIL.SpiderImagePlugin.
loadImageSeries
(filelist=None)[源代码]- create a list of Image.images for use in montage
PIL.SpiderImagePlugin.
makeSpiderHeader
(im)[源代码]
SunImagePlugin Module
- class
PIL.SunImagePlugin.
SunImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
TgaImagePlugin Module
- class
PIL.TgaImagePlugin.
TgaImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
TiffImagePlugin Module
- class
PIL.TiffImagePlugin.
AppendingTiffWriter
(fn, new=False)[源代码] 基类:
object
Tags
= {273, 288, 324, 519, 520, 521}close
()[源代码]fieldSizes
= [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8]finalize
()[源代码]fixIFD
()[源代码]fixOffsets
(count, isShort=False, isLong=False)[源代码]goToEnd
()[源代码]newFrame
()[源代码]readLong
()[源代码]readShort
()[源代码]rewriteLastLong
(value)[源代码]rewriteLastShort
(value)[源代码]rewriteLastShortToLong
(value)[源代码]seek
(offset, whence)[源代码]setEndian
(endian)[源代码]setup
()[源代码]skipIFDs
()[源代码]tell
()[源代码]write
(data)[源代码]writeLong
(value)[源代码]writeShort
(value)[源代码]
- class
PIL.TiffImagePlugin.
IFDRational
(value, denominator=1)[源代码] - 基类:
numbers.Rational
Implements a rational class where 0/0 is a legal value to matchthe in the wild use of exif rationals.
e.g., DigitalZoomRatio - 0.00/0.00 indicates that no digital zoom was used
denominator
limitrational
(_max_denominator)[源代码]
参数:max_denominator – Integer, the maximum denominator value返回:Tuple of (numerator, denominator)
PIL.TiffImagePlugin.
ImageFileDirectory
PIL.TiffImagePlugin.ImageFileDirectory_v1
的别名
- class
PIL.TiffImagePlugin.
ImageFileDirectoryv1
(args, *kwargs_)[源代码] - 基类:
PIL.TiffImagePlugin.ImageFileDirectory_v2
This class represents the legacy interface to a TIFF tag directory.
Exposes a dictionary interface of the tags in the directory:
- ifd = ImageFileDirectory_v1()
- ifd[key] = 'Some Data'
- ifd.tagtype[key] = 2
- print(ifd[key])
- ('Some Data',)
Also contains a dictionary of tag types as read from the tiff image file,~PIL.TiffImagePlugin.ImageFileDirectory_v1.tagtype.
Values are returned as a tuple.
3.0.0 版后已移除.
- classmethod
fromv2
(_original)[源代码] - Returns an
ImageFileDirectory_v1
instance with the same data as is contained in the originalImageFileDirectory_v2
instance.
tagdata
tags
to_v2
()[源代码]- Returns an
ImageFileDirectory_v2
instance with the same data as is contained in the originalImageFileDirectory_v1
instance.
- class
PIL.TiffImagePlugin.
ImageFileDirectoryv2
(_ifh=b'II*x00x00x00x00x00', prefix=None)[源代码] - 基类:
collections.abc.MutableMapping
This class represents a TIFF tag directory. To speed things up, wedon’t decode tags unless they’re asked for.
Exposes a dictionary interface of the tags in the directory:
- ifd = ImageFileDirectory_v2()
- ifd[key] = 'Some Data'
- ifd.tagtype[key] = 2
- print(ifd[key])
- 'Some Data'
Individual values are returned as the strings or numbers, sequences arereturned as tuples of the values.
The tiff metadata type of each item is stored in a dictionary oftag types in~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype. The typesare read from a tiff file, guessed from the type added, or addedmanually.
Data Structures:
- self.tagtype = {}
- Key: numerical tiff tag number
- Value: integer corresponding to the data type from
- ~PIL.TiffTags.TYPES`
3.0.0 新版功能.
legacy_api
load
(fp)[源代码]loadbyte
(_data, legacy_api=True)[源代码]loaddouble
(_data, legacy_api=True)loadfloat
(_data, legacy_api=True)loadlong
(_data, legacy_api=True)loadrational
(_data, legacy_api=True)[源代码]loadshort
(_data, legacy_api=True)loadsigned_byte
(_data, legacy_api=True)loadsigned_long
(_data, legacy_api=True)loadsigned_rational
(_data, legacy_api=True)[源代码]loadsigned_short
(_data, legacy_api=True)loadstring
(_data, legacy_api=True)[源代码]loadundefined
(_data, legacy_api=True)[源代码]named
()[源代码]
返回:dict of name|key: value
Returns the complete tag dictionary, with named tags where possible.
offset
prefix
reset
()[源代码]save
(fp)[源代码]writebyte
(_data)[源代码]writedouble
(*values_)writefloat
(*values_)writelong
(*values_)writerational
(*values_)[源代码]writeshort
(*values_)writesigned_byte
(*values_)writesigned_long
(*values_)writesigned_rational
(*values_)[源代码]writesigned_short
(*values_)writestring
(_value)[源代码]writeundefined
(_value)[源代码]
- class
PIL.TiffImagePlugin.
TiffImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
WebPImagePlugin Module
- class
PIL.WebPImagePlugin.
WebPImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
format
= 'WEBP'formatdescription
= 'WebP image'_is_animated
load
()[源代码]Load image data based on tile list
seek
(frame)[源代码]- Seeks to the given frame in this sequence file. If you seekbeyond the end of the sequence, the method raises anEOFError exception. When a sequence file is opened, thelibrary automatically seeks to frame 0.
Note that in the current version of the library, most sequenceformats 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 endof the sequence.
返回:Frame number, starting with 0.
WmfImagePlugin Module
- class
PIL.WmfImagePlugin.
WmfStubImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.StubImageFile
PIL.WmfImagePlugin.
registerhandler
(_handler)[源代码]- Install application-specific WMF image handler.
参数:handler – Handler object.
XVThumbImagePlugin Module
- class
PIL.XVThumbImagePlugin.
XVThumbImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile
XbmImagePlugin Module
- class
PIL.XbmImagePlugin.
XbmImageFile
(fp=None, filename=None)[源代码] 基类:
PIL.ImageFile.ImageFile