string_recorder.py 文件源码

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

项目:string_recorder 作者: kiyukuta 项目源码 文件源码
def make_gif(self, save_path, speed=0.3):
        if not save_path.endswith('.gif'):
            save_path += '.gif'

        images = []
        for img in self._images:
            image = PIL.Image.new('RGB', (self.width, self.height), 'white')
            image.paste(img, box=(0,0))
            images.append(numpy.asarray(image))

        imageio.mimsave(save_path, images, duration=speed)
        self.reset()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号