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

auto save

parent 4a991988 c303849l1672p256a15716/wx149348
Show whitespace changes
Inline Side-by-side
Showing with 21 additions and 15 deletions
  • bot.gif
  • 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
bot.gif
View file @ 797c0a8d
This diff is collapsed. Click to expand it.
d.py
View file @ 797c0a8d
from tkinter import filedialog,Tk
from PIL import Image
import imageio
def create_gif(image_list,gif_name,duration = 1.0)
'''
:param image_list:这个列表用于存放生成动图的图片
:peram gif_mane:字符串,所生成gif文件名,带.gif后缀
:peram dueation:图像间隔时间
:return:
'''
frames = []
for image_name in image_liast:
frames.append(imageio.imread(image_name))
imageio.mimsave(gif_mane,frames,'GIF',duration=duration)
return
root = Tk()
root.withdraw()
path = filedialog.askopenfilenames(title = '选择图片文件',
filetypes = [('ALL Files', '*')],
initialdir = "./")
img_list = []
for i in path:
img = image.open(1)
img_list.insert(0,img)
def main():
image_list = ['1.jpg','2.jpg','3.jpg']
gif_mane = 'new.gif'
duration = 1.5
create_gif(image_list,gif_mane,duration)
img_list[0].save("bot.gif",save_all = True,
append_images = img_list[1:])
\ No newline at end of file
if __name__=='__main__':
main()
\ No newline at end of file
This diff is collapsed. Click to expand it.
img/0.png 0 → 100644
View file @ 797c0a8d
img/0.png

48.4 KB

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

47.9 KB

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

52.1 KB

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

52.6 KB

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

51.8 KB

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

51.4 KB

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

50.2 KB

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

50.9 KB

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

50.2 KB

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

50.2 KB

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

50.1 KB

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

50.1 KB

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

47.7 KB

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

49.8 KB

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

50 KB

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

50.2 KB

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

50.1 KB

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

50.3 KB

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

50.9 KB

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

49.9 KB

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

48.9 KB

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

49.1 KB

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

49.6 KB

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

48.3 KB

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

49.4 KB

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

49 KB

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

49.1 KB

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

49.3 KB

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

49 KB

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

48.4 KB

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

48.2 KB

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

48.2 KB

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

49.1 KB

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

50.1 KB

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

52 KB

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

51.7 KB

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

52.1 KB

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