Joh*_*row 2 python tiff numpy python-imaging-library
可以使用 PIL 将多页 tiff 保存到文件中:im.save(filepath, save_all=True)
。我的问题是如何将 numpy 数组列表转换为 PIL 识别的 im 对象。im = PIL.Image.fromarray()
不接受列表。
此功能刚刚添加到 Pillow v.4.1.0.dev0 https://github.com/python-pillow/Pillow/pull/2406
还有一些其他库的其他解决方案。例如使用 tifffile如何使用 Python PIL 创建多帧图像