Commit fe536084 by BellCodeEditor

save project

parent 4a991988
Showing with 9 additions and 9 deletions
from tkinter import filedialog,Tk
from PIL import Image
from tkinter import filedialog,Tk #导入tk模块里的文件处理小模块
from PIL import Image #导入PIL中的Image功能
root = Tk()
root.withdraw()
path = filedialog.askopenfilenames(title = '选择图片文件',
filetypes = [('ALL Files', '*')],
root = Tk() #使用TK模块赋值给root对象
root.withdraw() #消除tk模块自带的小窗口
path = filedialog.askopenfilenames(title = '选择图片文件', #使用文件处理模块
filetypes = [('peg', '.peg')], #选的多个图片
initialdir = "./")
img_list = []
for i in path:
img = image.open(1)
img_list.insert(0,img)
img_list.insert(img)
img_list[0].save("bot.gif",save_all = True,
append_images = img_list[1:])
\ No newline at end of file
append_images = img_list[1:])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment