Skip to content

Commit

Permalink
add tomb yeah (#68)
Browse files Browse the repository at this point in the history
* fix this_chicken

* add tomb_yeah

* 🚨 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] committed Nov 12, 2023
1 parent 3f5a1e7 commit c2f9e1c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meme_generator/memes/this_chicken/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def this_chichen(images: List[BuildImage], texts, args):
max_fontsize=60,
min_fontsize=30,
fill="white",
stroke_ratio=1 / 15,
stroke_fill="black",
)
except ValueError:
raise TextOverLength(text)
Expand Down
25 changes: 25 additions & 0 deletions meme_generator/memes/tomb_yeah/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pathlib import Path
from typing import List

from pil_utils import BuildImage

from meme_generator import add_meme

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


def tomb_yeah(images: List[BuildImage], texts, args):
frame = BuildImage.open(img_dir / "0.jpg").convert("RGBA")
frame.paste(
images[0].convert("RGBA").circle().resize((145, 145)), (138, 265), alpha=True
)
if len(images) > 1:
frame.paste(
images[1].convert("RGBA").circle().rotate(30).resize((145, 145)),
(371, 312),
alpha=True,
)
return frame.save_jpg()


add_meme("tomb_yeah", tomb_yeah, min_images=1, max_images=2, keywords=["坟前比耶"])
Binary file added meme_generator/memes/tomb_yeah/images/0.jpg
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 c2f9e1c

Please sign in to comment.