Commit 93cd1f0c by BellCodeEditor

save project

parent 10f676bc
from PIL import Image,Image,ImageSequence from PIL import Image,Image,ImageSequence
img=Image.open('dive.gif') img=Image.open('cat2.gif')
num=0 num=0
for i in ImageSequence.Iterator(img): for i in ImageSequence.Iterator(img):
i.save('img/'+str(num)+'.png') i.save('un/'+str(num)+'.png')
num+=1 num+=1
\ No newline at end of file
...@@ -4,11 +4,11 @@ from PIL import Image ...@@ -4,11 +4,11 @@ from PIL import Image
root=Tk() root=Tk()
root.withdraw() root.withdraw()
path=filedialog.askopenfilenames(title='选择图片文件',filetypes=[('All Files','*')],initialdir="./") path=filedialog.askopenfilenames(title='选择图片文件',filetypes=[('png','png')],initialdir="./")
img_list=[] img_list=[]
for i in path: for i in path:
img = Image.open(i) img = Image.open(i)
img_list.append(img) img_list.insert(0,img)
img_list[0].save('bot.gif',save_all=True,append_images=img_list[1:]) img_list[0].save('bot.gif',save_all=True,append_images=img_list[1:])
\ No newline at end of file
un/0.png

48.4 KB

un/1.png

47.9 KB

un/10.png

52.1 KB

un/11.png

52.6 KB

un/12.png

51.8 KB

un/13.png

51.4 KB

un/14.png

50.2 KB

un/15.png

50.9 KB

un/16.png

50.2 KB

un/17.png

50.2 KB

un/18.png

50.1 KB

un/19.png

50.1 KB

un/2.png

47.7 KB

un/20.png

49.8 KB

un/22.png

50.2 KB

un/23.png

50.1 KB

un/24.png

50.3 KB

un/25.png

50.9 KB

un/26.png

49.9 KB

un/27.png

48.9 KB

un/28.png

49.1 KB

un/29.png

49.6 KB

un/3.png

48.3 KB

un/30.png

49.4 KB

un/32.png

49.1 KB

un/33.png

49.3 KB

un/35.png

48.4 KB

un/36.png

48.2 KB

un/4.png

48.2 KB

un/5.png

49.1 KB

un/6.png

50.1 KB

un/7.png

52 KB

un/8.png

51.7 KB

un/9.png

52.1 KB

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