Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / level3-lesson22-diy1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 508e5d7e authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 4a991988
Hide whitespace changes
Inline Side-by-side
Showing with 16 additions and 16 deletions
  • 5444444444444444444444444444444444444444444444444444.py
  • d.py
  • dive.gif
  • resources/img
  • take out and in.py
5444444444444444444444444444444444444444444444444444.py 0 → 100644
View file @ 508e5d7e
This diff is collapsed. Click to expand it.
d.py
View file @ 508e5d7e
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 = [('png', '.png')],
initialdir = "./")
img_list = []
sequence = []
for i in path:
img = image.open(1)
img_list.insert(0,img)
img = Image.open(i)
sequence.insert(0,img)
img_list[0].save("bot.gif",save_all = True,
append_images = img_list[1:])
\ No newline at end of file
sequence[0].save("dive.gif",save_all = True,
append_images = sequence[1:])
\ No newline at end of file
This diff is collapsed. Click to expand it.
dive.gif
View file @ 508e5d7e
This diff is collapsed. Click to expand it.
resources/img 0 → 100644
View file @ 508e5d7e
This diff is collapsed. Click to expand it.
take out and in.py
View file @ 508e5d7e
from PIL import Image,ImageSequence
im=Image.open('dive.gif')
img=Image.open('dive.gif')
num=0
for i in ImageSequence.Iterator(im):
for i in ImageSequence.Iterator(img):
i.save('turn/'+str(num)+'.png')
num+=1
\ No newline at end of file
num+=1 #上课内容,打开动图
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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