Skip to content

Commit

Permalink
添加表情:小撅 (#14)
Browse files Browse the repository at this point in the history
* 添加表情:小撅

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jcjrobert and pre-commit-ci[bot] authored Jul 12, 2024
1 parent aa50f51 commit 20596e4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions memes/little_do/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pathlib import Path

from meme_generator import add_meme
from meme_generator.utils import save_gif
from PIL.Image import Image as IMG
from pil_utils import BuildImage

img_dir = Path(__file__).parent / "images"


def little_do(images: list[BuildImage], texts, args):
self_head = images[0].convert("RGBA").circle().resize((21, 21))
user_head = images[1].convert("RGBA").circle().resize((21, 21)).rotate(90)
frames: list[IMG] = []
for i in range(7):
frame = BuildImage.open(img_dir / f"{i}.png")
frame.paste(self_head, (40, 4), alpha=True)
frame.paste(user_head, (6, 46), alpha=True)
frames.append(frame.image)
return save_gif(frames, 0.05)


add_meme(
"little_do", little_do, min_images=2, max_images=2, keywords=["小撅", "轻撅", "滑稽撅"]
)
Binary file added memes/little_do/images/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added memes/little_do/images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20596e4

Please sign in to comment.