【发布时间】:2021-01-04 22:02:45
【问题描述】:
操作系统:Linux - Ubantu
我使用的图片:最初是 .ico,但我在线转换为 .xbm
我尝试了不同的图片和不同的网站,但似乎没有任何效果
代码:
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title("B")
root.iconbitmap('@/home/zaki/Pictures/mar.xbm')
root.mainloop()
窗口正常显示,但没有图标
【问题讨论】:
-
使用 ico 代替 xbm?或者去here
标签: python image user-interface tkinter python-imaging-library