77问答网
所有问题
python ImageTk.PhotoImage()加载图片 报错内存不足问题?
如题所述
举报该问题
相似回答
python
Tkinter.TK与PIL.
ImageTK
的
问题
答:
img =
ImageTk.PhotoImage(
im)看上面一句,我们需要关注的是PhotoImage这个方法,所以看下他的源码 self.__photo = tkinter.PhotoImage(**kw)发现了上面这一句 是的它调用了tkinter下面的PhotoImage方法 class PhotoImage(Image): """Widget which can display colored images in GIF, PPM/PGM format...
把我自定义函数运行出来的结果和代码放入一个窗口?
答:
运行函数并将结果存储到变量中 result = my_function(3)定义一个列表 my_list = [1, 2, 3, 4, 5]
加载图片
并转换为Tkinter格式 img = Image.open('example.png')img_data = np.array(img)img_tk =
ImageTk.PhotoImage(
Image.fromarray(img_data))将结果、列表和字符串转换为...
大家正在搜
pythonpopen会报错
nuget报错python
为什么python不报错不出结果
python不报错怎么运行不了
python函数运行不过也不报错
python中升级pip报错
python报错killed
python画图报错
python 报错