这篇文章主要介绍“python的ImageTk.PhotoImage坑怎么解决”,在日常操作中,相信很多人在python的ImageTk.PhotoImage坑怎么解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”python的ImageTk.PhotoImage坑怎么解决”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!如果大家遇到这样的报错:Exception in Tkinter callback
Traceback (most recent call last):
File “E:Anaconda3_fileslibsite-packagesPILImage.py”, line 2515, in fromarray
mode, rawm免费云主机域名ode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), ‘
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “E:Anaconda3_fileslibtkinter__init__.py”, line 1705, in __call__
return self.func(*args)
File “D:Junior SpringDigital Image Processing and Experiment数字实验备份结课实验ImgProcessing.py”, line 806, in Sobel_Sharpening
image = ImageTk.PhotoImage(Image.fromarray(img))
File “E:Anaconda3_fileslibsite-packagesPILImage.py”, line 2517, in fromarray
raise TypeError(“Cannot handle this data type”)
TypeError: Cannot handle this data type
During handling of the above exception, another exception occurred:Traceback (most recent call last):
File “E:Anaconda3_fileslibtkinter__init__.py”, line 1705, in __call__
return self.func(*args)
File “D:Junior SpringDigital Image Processing and Experiment数字实验备份结课实验ImgProcessing.py”, line 806, in Sobel_Sharpening
image = ImageTk.PhotoImage(Image.fromarray(img))
File “E:Anaconda3_fileslibsite-packagesPILImage.py”, line 2517, in fromarray
raise TypeError(“Cannot handle this data type”)
TypeError: Cannot handle this data type网上很多教程的方法我也试过,没有用,也调试不出为什么这里有个很关键的信息:Cannot handle this data type说明是数据的类型错了,但再三检查后,明明就是带入的
这篇文章主要讲解了“Vue中Vue.prototype如何用”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Vue中Vue.prototype如何用”吧!在main.js中添加一个变量到 Vue.prototyp…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。