import tkinter as tk
from PIL import Image, ImageTk
win = tk.Tk()
win.title("逻辑网")
win.iconbitmap('../image/icon.ico')
# 显示图片(注意这里默认支持的图片格式为GIF)
image = Image.open("../image/eyes.png")
photo = ImageTk.PhotoImage(image)
print(type(photo))
# 将图片放在主窗口的右边
lab = tk.Label(win, image=photo).pack(side="right")
# 显示文字,设置文本格式
text = "逻辑欢迎您,\n" \
"这里有精彩的教程,\n " \
"这里有数不尽的知识宝藏"
lab_text = tk.Label(win, text=text, fg='#7CCD7C', font=('微软雅黑', 15, 'italic'), justify='left', padx=10).pack(
side='left')
win.mainloop()