PngImagePlugin.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:workflows.kyoyue 作者: wizyoung 项目源码 文件源码
def verify(self, endchunk=b"IEND"):

        # Simple approach; just calculate checksum for all remaining
        # blocks.  Must be called directly after open.

        cids = []

        while True:
            try:
                cid, pos, length = self.read()
            except struct.error:
                raise IOError("truncated PNG file")

            if cid == endchunk:
                break
            self.crc(cid, ImageFile._safe_read(self.fp, length))
            cids.append(cid)

        return cids
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号