使用 PIL 保存多页 tiff
Saving a multipage tiff using PIL
可以使用 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 How to create a multiple frame image using Python PIL
可以使用 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 How to create a multiple frame image using Python PIL