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 7a56e47d authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent 9948c054
Show whitespace changes
Inline Side-by-side
Showing with 13 additions and 13 deletions
  • d.py
  • img/0.png
  • img/1.png
  • img/10.png
  • img/11.png
  • img/12.png
  • img/13.png
  • img/14.png
  • img/15.png
  • img/16.png
  • img/17.png
  • img/18.png
  • img/19.png
  • img/2.png
  • img/20.png
  • img/21.png
  • img/22.png
  • img/23.png
  • img/24.png
  • img/25.png
  • img/26.png
  • img/27.png
  • img/28.png
  • img/29.png
  • img/3.png
  • img/30.png
  • img/31.png
  • img/32.png
  • img/33.png
  • img/34.png
  • img/35.png
  • img/36.png
  • img/4.png
  • img/5.png
  • img/6.png
  • img/7.png
  • img/8.png
  • img/9.png
  • img/py.py
d.py
View file @ 7a56e47d
from tkinter import filedialog,Tk from tkinter import filedialog, Tk
from PIL import Image from PIL import Image
root = Tk() root = Tk()
root.withdraw() root.withdraw()
path = filedialog.askopenfilenames(title = '选择图片文件', path = filedialog.askopenfilenames(title='选择图片文件',
filetypes = [('ALL Files', '*')], filetypes=[("png", ".png")],
initialdir = "./") initialdir="./")
img_list = []
for i in path:
img = image.open(1)
img_list.insert(0,img)
sequence = []
for i in path:
img = Image.open(i)
sequence.append(img)
img_list[0].save("bot.gif",save_all = True, sequence[0].save("bot.gif", save_all=True,
append_images = img_list[1:]) append_images=sequence[1:])
\ No newline at end of file \ No newline at end of file
This diff is collapsed. Click to expand it.
img/0.png 0 → 100644
View file @ 7a56e47d
img/0.png

48.4 KB

This diff is collapsed. Click to expand it.
img/1.png 0 → 100644
View file @ 7a56e47d
img/1.png

47.9 KB

This diff is collapsed. Click to expand it.
img/10.png 0 → 100644
View file @ 7a56e47d
img/10.png

52.1 KB

This diff is collapsed. Click to expand it.
img/11.png 0 → 100644
View file @ 7a56e47d
img/11.png

52.6 KB

This diff is collapsed. Click to expand it.
img/12.png 0 → 100644
View file @ 7a56e47d
img/12.png

51.8 KB

This diff is collapsed. Click to expand it.
img/13.png 0 → 100644
View file @ 7a56e47d
img/13.png

51.4 KB

This diff is collapsed. Click to expand it.
img/14.png 0 → 100644
View file @ 7a56e47d
img/14.png

50.2 KB

This diff is collapsed. Click to expand it.
img/15.png 0 → 100644
View file @ 7a56e47d
img/15.png

50.9 KB

This diff is collapsed. Click to expand it.
img/16.png 0 → 100644
View file @ 7a56e47d
img/16.png

50.2 KB

This diff is collapsed. Click to expand it.
img/17.png 0 → 100644
View file @ 7a56e47d
img/17.png

50.2 KB

This diff is collapsed. Click to expand it.
img/18.png 0 → 100644
View file @ 7a56e47d
img/18.png

50.1 KB

This diff is collapsed. Click to expand it.
img/19.png 0 → 100644
View file @ 7a56e47d
img/19.png

50.1 KB

This diff is collapsed. Click to expand it.
img/2.png 0 → 100644
View file @ 7a56e47d
img/2.png

47.7 KB

This diff is collapsed. Click to expand it.
img/20.png 0 → 100644
View file @ 7a56e47d
img/20.png

49.8 KB

This diff is collapsed. Click to expand it.
img/21.png 0 → 100644
View file @ 7a56e47d
img/21.png

50 KB

This diff is collapsed. Click to expand it.
img/22.png 0 → 100644
View file @ 7a56e47d
img/22.png

50.2 KB

This diff is collapsed. Click to expand it.
img/23.png 0 → 100644
View file @ 7a56e47d
img/23.png

50.1 KB

This diff is collapsed. Click to expand it.
img/24.png 0 → 100644
View file @ 7a56e47d
img/24.png

50.3 KB

This diff is collapsed. Click to expand it.
img/25.png 0 → 100644
View file @ 7a56e47d
img/25.png

50.9 KB

This diff is collapsed. Click to expand it.
img/26.png 0 → 100644
View file @ 7a56e47d
img/26.png

49.9 KB

This diff is collapsed. Click to expand it.
img/27.png 0 → 100644
View file @ 7a56e47d
img/27.png

48.9 KB

This diff is collapsed. Click to expand it.
img/28.png 0 → 100644
View file @ 7a56e47d
img/28.png

49.1 KB

This diff is collapsed. Click to expand it.
img/29.png 0 → 100644
View file @ 7a56e47d
img/29.png

49.6 KB

This diff is collapsed. Click to expand it.
img/3.png 0 → 100644
View file @ 7a56e47d
img/3.png

48.3 KB

This diff is collapsed. Click to expand it.
img/30.png 0 → 100644
View file @ 7a56e47d
img/30.png

49.4 KB

This diff is collapsed. Click to expand it.
img/31.png 0 → 100644
View file @ 7a56e47d
img/31.png

49 KB

This diff is collapsed. Click to expand it.
img/32.png 0 → 100644
View file @ 7a56e47d
img/32.png

49.1 KB

This diff is collapsed. Click to expand it.
img/33.png 0 → 100644
View file @ 7a56e47d
img/33.png

49.3 KB

This diff is collapsed. Click to expand it.
img/34.png 0 → 100644
View file @ 7a56e47d
img/34.png

49 KB

This diff is collapsed. Click to expand it.
img/35.png 0 → 100644
View file @ 7a56e47d
img/35.png

48.4 KB

This diff is collapsed. Click to expand it.
img/36.png 0 → 100644
View file @ 7a56e47d
img/36.png

48.2 KB

This diff is collapsed. Click to expand it.
img/4.png 0 → 100644
View file @ 7a56e47d
img/4.png

48.2 KB

This diff is collapsed. Click to expand it.
img/5.png 0 → 100644
View file @ 7a56e47d
img/5.png

49.1 KB

This diff is collapsed. Click to expand it.
img/6.png 0 → 100644
View file @ 7a56e47d
img/6.png

50.1 KB

This diff is collapsed. Click to expand it.
img/7.png 0 → 100644
View file @ 7a56e47d
img/7.png

52 KB

This diff is collapsed. Click to expand it.
img/8.png 0 → 100644
View file @ 7a56e47d
img/8.png

51.7 KB

This diff is collapsed. Click to expand it.
img/9.png 0 → 100644
View file @ 7a56e47d
img/9.png

52.1 KB

This diff is collapsed. Click to expand it.
img/py.py
View file @ 7a56e47d
from PIL import Image,ImageSequence from PIL import Image,ImageSequence
img = Image.open("dive.gif") img = Image.open("bot.gif")
num = 0 num = 0
for i in ImageSequence.Iterator(img): for i in ImageSequence.Iterator(img):
i.save(r"./img"+str(num)+".png") i.save("img/"+str(num)+".png") # 这里把分解到的每一张静态图保存到当前目录下
num += 1 num += 1
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