首页 > 解决方案 > 如何在 Windows 上使用 PIL 打开 TIFF?

问题描述

我正在尝试使用 PILLOW Image.open 打开 12 波段 tiff(一年中每个月的 1 个温度图像),以便最终将 tiff 转换为 numpy 数组。但是,我收到错误:“IOError:无法识别图像文件”。我检查了我的路径和文件名。我想知道这是 Windows 操作系统问题还是多频段 tiff 问题。

我的程序基于这篇文章:Working with TIFFs (import, export) in Python using numpy

从 PIL 导入图像

im = Image.open('a_image.tif')

标签: pythonpython-imaging-librarytiff

解决方案


推荐阅读