从TIFF转换为无PIL的PNG

发布于 2025-02-13 04:17:31 字数 330 浏览 2 评论 0原文

有人可以提出一种不使用PIL的情况下从Python转换为PNG的好方法吗? PIL似乎是最建议的方法,但它无法理解我的文件的数据格式。当我尝试使用PIL时,我会收到一个身份不明的图像错误:

from PIL import Image
im = Image.open('path/to/dir/my_file.tiff')

pil.unideifiedImageError:无法识别映像文件'my_file.tiff'

据我了解,这是因为这些是64位TIFF文件, PIL无法理解。那么,谁能提出另一种建议,我可以将这些图像转换为PNG?

Can someone please suggest a good way to convert from TIFF to PNG in python without using PIL? PIL seems to be the most suggested way to do this, but it cannot understand the data format of my files. When I try to use PIL, I get an unidentified image error:

from PIL import Image
im = Image.open('path/to/dir/my_file.tiff')

PIL.UnidentifiedImageError: cannot identify image file 'my_file.tiff'

As I understand it, this it because these are 64 bit TIFF files, which PIL cannot understand. So, can anyone suggest another way that I can convert these images to PNGs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文