Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Aug 28, 2023
1 parent 5cfecaa commit e8b111f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions meme_generator/memes/vibrate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@


def vibrate(images: List[BuildImage], texts, args):

def maker(i: int) -> Maker:
def make(img: BuildImage) -> BuildImage:
img = img.convert("RGBA").square()
w = img.size[0]
locs = [
(0, 0), (w//25, w//25), (w//50, w//50), (0, w//25), (w//25, 0)
(0, 0),
(w // 25, w // 25),
(w // 50, w // 50),
(0, w // 25),
(w // 25, 0),
]
frame = BuildImage.new("RGBA", (w+w//25, w+w//25), "white")
frame = BuildImage.new("RGBA", (w + w // 25, w + w // 25), "white")
frame.paste(img, locs[i], alpha=True)
return frame

return make

return make_gif_or_combined_gif(
images[0], maker, 5, 0.05, FrameAlignPolicy.extend_loop
)
Expand Down

0 comments on commit e8b111f

Please sign in to comment.