python - 如何在 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')
解决方案
推荐阅读
- logstash - logstash - 同时加载单行日志和多行日志
- python - 如何将变量从详细信息方法传递到下载器方法?
- android - 如何在使用 kotlin 从活动中按下后刷新片段
- python - ValueError:无法引用参数值
当我尝试使用 python manage.py migrate 应用迁移时出现此错误。我正在使用 sqlite3。我的模型中有一个 JSONField。请任何想法如何解决这个问题。下面是整个异常的一个片段。
Operations to perform: Apply all migrat
- javascript - 使用动态路由在 React 中将单个 JSON 文件中的数据从父组件传递到子组件
- r - 关于 igraph R 的问题 - 不同节点中的相同数据
- php - 如何在 php codeigniter 中使用 mpdf [生成多个文件] 创建 zip 文件?
- netbeans - 无法激活 nb-javac
- html - 如何将徽标制作成按钮
- android - 在 Redmi 设备上启用“在锁定屏幕上显示”权限