最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python imaging library - PIL UnidentifiedImageError: do PIL support reading .img files? and if not how to read them? - Stack Ove

programmeradmin4浏览0评论

I tried to open .img images with PIL/pillow library but it seems like it does not support reading them. What can I do?

from PIL import Image

image=Image.open('C:/Users/mkmoh/Dropbox/20250317/MOR_L_20250317_192902_002.img')

image.show()

you can find bellow the error message.

---------------------------------------------------------------------------
UnidentifiedImageError                    Traceback (most recent call last)
Cell In[25], line 2
      1 from PIL import Image
----> 2 image=Image.open('C:/Users/mkmoh/Dropbox/20250317/MOR_L_20250317_192902_002.img')
      3 image.show()

File ~\anaconda3\Lib\site-packages\PIL\Image.py:3498, in open(fp, mode, formats)
   3496     warnings.warn(message)
   3497 msg = "cannot identify image file %r" % (filename if filename else fp)
-> 3498 raise UnidentifiedImageError(msg)

UnidentifiedImageError: cannot identify image file 'C:\\Users\\mkmoh\\Dropbox\\20250317\\MOR_L_20250317_192902_002.img'

Thank you in advance

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论