阅读(4608) 赞(5)

PngImagePlugin 模块

2021-07-19 09:36:53 更新
​classPIL.PngImagePlugin.ChunkStream(fp)​

基类:object

​call(cid, pos, length)​

调用适当的块处理程序

​close()​
​crc(cid, data)​

读取并验证校验和

​crc_skip(cid, data)​

读取校验和。C模块不存在时使用

​push(cid, pos, length)​
​read()​

获取新块。返回头信息。

​verify(endchunk=b'IEND')​
​classPIL.PngImagePlugin.PngImageFile(fp=None, filename=None)​

基类:PIL.ImageFile.ImageFile

​getexif()​
​load_end()​

内部:读取完图像数据

​load_prepare()​

内部:准备读取PNG文件。

​load_read(read_bytes)​

内部:读取更多图像数据

​seek(frame)​

查找此序列文件中的给定帧。如果在序列结尾之外查找,该方法将引发 EOFError 错误。打开序列文件时,库自动查找第0帧。

见 tell() .

参数

frame -- 帧编号,从0开始。

引发

EOFError -- 如果调用试图在序列结束后查找。

​tell()​

返回当前帧号。见 seek() .

返回

帧编号,从0开始。

​verify()​

验证PNG文件

​format= 'PNG'​
​format_description= 'Portable network graphics'​
​propertytext​
​classPIL.PngImagePlugin.PngStream(fp)​

基类:PIL.PngImagePlugin.ChunkStream

​check_text_memory(chunklen)​
​chunk_IDAT(pos, length)​
​chunk_IEND(pos, length)​
​chunk_IHDR(pos, length)​
​chunk_PLTE(pos, length)​
​chunk_acTL(pos, length)​
​chunk_cHRM(pos, length)​
​chunk_eXIf(pos, length)​
​chunk_fcTL(pos, length)​
​chunk_fdAT(pos, length)​
​chunk_gAMA(pos, length)​
​chunk_iCCP(pos, length)​
​chunk_iTXt(pos, length)​
​chunk_pHYs(pos, length)​
​chunk_sRGB(pos, length)​
​chunk_tEXt(pos, length)​
​chunk_tRNS(pos, length)​
​chunk_zTXt(pos, length)​
​rewind()​
​save_rewind()​
​PIL.PngImagePlugin.getchunks(im, **params)​

返回表示此图像的PNG块列表。

PIL.PngImagePlugin.is_cid(string, pos=0, endpos=9223372036854775807)

匹配字符串开头的零个或多个字符。

​PIL.PngImagePlugin.putchunk(fp, cid, *data)​

写入PNG块(包括CRC字段)