BmpImagePlugin
模块¶PIL.BmpImagePlugin.
BmpImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
Windows位图格式(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'¶PIL.BmpImagePlugin.
DibImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.BmpImagePlugin.BmpImageFile
format
= 'DIB'¶format_description
= 'Windows Bitmap'¶BufrStubImagePlugin
模块¶CurImagePlugin
模块¶PIL.CurImagePlugin.
CurImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.BmpImagePlugin.BmpImageFile
format
= 'CUR'¶format_description
= 'Windows Cursor'¶DcxImagePlugin
模块¶PIL.DcxImagePlugin.
DcxImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.PcxImagePlugin.PcxImageFile
format
= 'DCX'¶format_description
= 'Intel DCX'¶is_animated
¶n_frames
¶EpsImagePlugin
模块¶PIL.EpsImagePlugin.
EpsImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
python图像库的eps文件分析器
format
= 'EPS'¶format_description
= 'Encapsulated Postscript'¶mode_map
= {1: 'L', 2: 'LAB', 3: 'RGB', 4: 'CMYK'}¶FitsStubImagePlugin
模块¶FliImagePlugin
模块¶PIL.FliImagePlugin.
FliImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'FLI'¶format_description
= 'Autodesk FLI/FLC Animation'¶is_animated
¶n_frames
¶FpxImagePlugin
模块¶GbrImagePlugin
模块¶GifImagePlugin
模块¶PIL.GifImagePlugin.
GifImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'GIF'¶format_description
= 'Compuserve GIF'¶global_palette
= None¶is_animated
¶n_frames
¶GribStubImagePlugin
模块¶Hdf5StubImagePlugin
模块¶IcnsImagePlugin
模块¶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>)]}¶PIL.IcnsImagePlugin.
IcnsImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
对mac os.icns文件的pil映像支持。选择最佳分辨率,但如果在调用“load”之前改变大小属性,则可能加载不同大小的图像。
信息字典有一个键“大小”,它是ICN文件的大小列表。
format
= 'ICNS'¶format_description
= 'Mac OS icns resource'¶size
¶IcoImagePlugin
模块¶PIL.IcoImagePlugin.
IcoImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
PIL只读图像支持Microsoft Windows.ico文件。
默认情况下,将加载文件中的最大分辨率图像。这可以通过在调用“load”之前更改“size”属性来更改。
信息字典有一个键“大小”,它是图标文件中可用大小的列表。
处理经典、XP和Vista图标格式。
此插件是bryan davis<casadebender@gmail.com>重构的win32iconimageplugin版本。https://code.google.com/archive/p/casadebender/wikis/win32iconimageplugin.wiki
format
= 'ICO'¶format_description
= 'Windows Icon'¶size
¶ImImagePlugin
模块¶PIL.ImImagePlugin.
ImImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'IM'¶format_description
= 'IFUNC Image Memory'¶is_animated
¶n_frames
¶ImtImagePlugin
模块¶IptcImagePlugin
模块¶PIL.IptcImagePlugin.
IptcImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'IPTC'¶format_description
= 'IPTC/NAA'¶JpegImagePlugin
模块¶Jpeg2KImagePlugin
模块¶McIdasImagePlugin
模块¶MicImagePlugin
模块¶PcdImagePlugin
模块¶PcxImagePlugin
模块¶PdfImagePlugin
模块¶PixarImagePlugin
模块¶PngImagePlugin
模块¶PIL.PngImagePlugin.
is_cid
()¶匹配字符串开头的零个或多个字符。
PIL.PngImagePlugin.
PngImageFile
(fp=None, filename=None)[源代码]基类:PIL.ImageFile.ImageFile
format
= 'PNG'¶format_description
= 'Portable network graphics'¶load_end
()[源代码]内部:读取完图像数据
load_prepare
()[源代码]内部:准备读取PNG文件
load_read
(read_bytes)[源代码]内部:读取更多图像数据
text
¶verify
()[源代码]验证PNG文件
PpmImagePlugin
模块¶PsdImagePlugin
模块¶PIL.PsdImagePlugin.
PsdImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'PSD'¶format_description
= 'Adobe Photoshop'¶is_animated
¶n_frames
¶SpiderImagePlugin
模块¶PIL.SpiderImagePlugin.
SpiderImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'SPIDER'¶format_description
= 'Spider 2D image'¶is_animated
¶n_frames
¶SunImagePlugin
模块¶TgaImagePlugin
模块¶TiffImagePlugin
模块¶PIL.TiffImagePlugin.
AppendingTiffWriter
(fn, new=False)[源代码]¶基类:object
Tags
= {273, 288, 324, 519, 520, 521}¶fieldSizes
= [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8]¶PIL.TiffImagePlugin.
IFDRational
(value, denominator=1)[源代码]¶基类:numbers.Rational
实现一个Rational类,其中0/0是一个合法值,以匹配在野外使用的exif理性。
例如,DigitalZoomRatio-0.00/0.00表示未使用数码变焦。
denominator
¶numerator
¶PIL.TiffImagePlugin.
ImageFileDirectory
¶PIL.TiffImagePlugin.
ImageFileDirectory_v1
(*args, **kwargs)[源代码]¶基类:PIL.TiffImagePlugin.ImageFileDirectory_v2
此类表示 legacy 接口到TIFF标记目录。
显示目录中标记的字典接口::
ifd = ImageFileDirectory_v1()
ifd[key] = 'Some Data'
ifd.tagtype[key] = 2
print(ifd[key])
('Some Data',)
还包含从TIFF图像文件中读取的标记类型字典,~pil.tiffImagePlugin.ImageFileDirectory_v1.tagType。
值作为元组返回。
3.0.0 版后已移除.
from_v2
(original)[源代码]¶返回一个 ImageFileDirectory_v1
与原始中包含的数据相同的实例 ImageFileDirectory_v2
实例。
返回: | ImageFileDirectory_v1 |
---|
tagdata
¶to_v2
()[源代码]¶返回一个 ImageFileDirectory_v2
与原始中包含的数据相同的实例 ImageFileDirectory_v1
实例。
返回: | ImageFileDirectory_v2 |
---|
PIL.TiffImagePlugin.
ImageFileDirectory_v2
(ifh=b'II*x00x00x00x00x00', prefix=None)[源代码]¶基类:collections.abc.MutableMapping
此类表示TIFF标记目录。为了加快速度,我们不会解码标签,除非有人要求。
显示目录中标记的字典接口::
ifd = ImageFileDirectory_v2()
ifd[key] = 'Some Data'
ifd.tagtype[key] = 2
print(ifd[key])
'Some Data'
单个值作为字符串或数字返回,序列作为值的元组返回。
每个项目的TIFF元数据类型存储在`~pil.tiffImagePlugin.ImageFileDirectory_v2.TagType`中的标记类型字典中。这些类型是从TIFF文件中读取、从添加的类型中猜测或手动添加的。
数据结构:
- self.tagtype=
- 键:数字TIFF标记号
- 值:与来自的数据类型对应的整数
- ~ pil.tifftags.类型`
3.0.0 新版功能.
legacy_api
¶load_double
(data, legacy_api=True)¶load_float
(data, legacy_api=True)¶load_long
(data, legacy_api=True)¶load_short
(data, legacy_api=True)¶load_signed_byte
(data, legacy_api=True)¶load_signed_long
(data, legacy_api=True)¶load_signed_short
(data, legacy_api=True)¶offset
¶prefix
¶write_double
(*values)¶write_float
(*values)¶write_long
(*values)¶write_short
(*values)¶write_signed_byte
(*values)¶write_signed_long
(*values)¶write_signed_short
(*values)¶WebPImagePlugin
模块¶PIL.WebPImagePlugin.
WebPImageFile
(fp=None, filename=None)[源代码]¶基类:PIL.ImageFile.ImageFile
format
= 'WEBP'¶format_description
= 'WebP image'¶is_animated
¶n_frames
¶WmfImagePlugin
模块¶XVThumbImagePlugin
模块¶XbmImagePlugin
模块¶