-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 添加表情:小撅 * 🚨 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
1 parent
aa50f51
commit 20596e4
Showing
8 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=["小撅", "轻撅", "滑稽撅"] | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.