1+ import random
12from datetime import datetime
23from pathlib import Path
3- import random
44
55from PIL .Image import Image as IMG
66from pil_utils import BuildImage
1212
1313
1414def spider (images : list [BuildImage ], texts , args ):
15- head = images [0 ].convert ("RGBA" ).circle ().resize ((80 ,80 ))
15+ head = images [0 ].convert ("RGBA" ).circle ().resize ((80 , 80 ))
1616 # fmt: off
1717 Xs = [
1818 174 , 174 , 174 , 169 ,
@@ -32,7 +32,7 @@ def spider(images: list[BuildImage], texts, args):
3232 # fmt: on
3333 frames : list [IMG ] = []
3434 for i in range (52 ):
35- pos = (Xs [i ],24 + random .randint (- 1 ,1 ))
35+ pos = (Xs [i ], 24 + random .randint (- 1 , 1 ))
3636 frame = BuildImage .open (img_dir / f"{ i } .png" )
3737 frame .paste (head , pos , alpha = True )
3838 frames .append (frame .image )
@@ -45,6 +45,6 @@ def spider(images: list[BuildImage], texts, args):
4545 min_images = 1 ,
4646 max_images = 1 ,
4747 keywords = ["蜘蛛" , "蜘蛛爬" ],
48- date_created = datetime (2025 ,4 , 27 ),
49- date_modified = datetime (2025 ,4 , 27 ),
48+ date_created = datetime (2025 , 4 , 27 ),
49+ date_modified = datetime (2025 , 4 , 27 ),
5050)
0 commit comments