Pillow GifImagePlugin模块
-
classPIL.GifImagePlugin.GifImageFile(fp=None, filename=None) 基类:
PIL.ImageFile.ImageFile-
data()
-
format= 'GIF'
-
format_description= 'Compuserve GIF'
-
global_palette= None
-
propertyis_animated
-
load_end()
-
propertyn_frames
-
seek(frame) 查找此序列文件中的给定帧。如果在序列结尾之外查找,该方法将引发
EOFError例外。打开序列文件时,库自动查找第0帧。见
tell()。- 参数
frame -- 帧编号,从0开始。
- 引发
EOFError -- 如果调用试图在序列结束后查找。
-
tell() 返回当前帧号。见
seek().- 返回
帧编号,从0开始。
-
-
PIL.GifImagePlugin.get_interlace(im)
-
PIL.GifImagePlugin.getdata(im, offset=0, 0, **params) 遗留方法
返回表示此图像的字符串列表。第一个字符串是本地图像头,其余字符串包含编码的图像数据。
- 参数
im -- 图像对象
offset -- (x,y)像素的元组。默认为(0,0)
**params -- 例如,持续时间或其他编码器信息参数
- 返回
包含GIF编码帧数据的字节列表
-
PIL.GifImagePlugin.getheader(im, palette=None, info=None) 从图像中获取GIF数据的传统方法。
警告::可能会修改图像数据。
- 参数
im -- 图像对象
palette -- 包含源调色板的bytes对象,或….
info -- 编码信息
- 返回
(标题项列表,优化调色板)的元组