在python未知伪标签中打开TIFF时出错 [英] Error opening TIFF in python unknown pseudo-tag

查看:30
本文介绍了在python未知伪标签中打开TIFF时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 python 中打开一个 .TIFF 图像.我的代码是

I am trying to open a .TIFF image in python. My code is

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image

photos = Image.open("haz(1,8grados).tif")
photos.show()

我收到错误

TIFFSetField: tempfile.tif: Unknown pseudo-tag 65538.

有人可以帮忙吗?我在 Mac OS High Sierra 中运行 python 3.

Can anyone help with this? I am running python 3 in Mac OS High Sierra.

推荐答案

这是一个确认了 PIL/Pillow 中的错误.否则,这是一个无辜的警告,您无需做任何不同的事情.您无法消除警告,但是,它是从 PIL 所依赖的 TIFF 解码库发出的.

This is a confirmed bug in PIL / Pillow. It is otherwise an innocent warning, and nothing you need to do differently. You can't silence the warning, however, it is emitted from the TIFF decoding library that PIL depends on.

您可以下载 Pillow 源代码并应用修复本地错误,或等待将于 2019 年 1 月发布的新季度发布.

You can either download the Pillow source code and apply the fix for the bug locally, or wait for the new quarterly release that will be published in January 2019.

这篇关于在python未知伪标签中打开TIFF时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆