Skip to content

Commit b23f388

Browse files
committed
✏️ 修改
merry_christmas 原“圣诞快乐”主题更新为 🎄 平安夜(Christmas Eve) 风格,适配夜间氛围与节日元素。 merry_christmas(重做) 提升整体表现力与节日氛围。 look_leg “看看腿”素材重新制作,优化视觉呈现与资源结构。 📂 移动 huochailu(火柴撸) 已移至 meme_nsfw 仓库,归类至nsfw分区。 🆕 新增 christmas_hat 🎅 添加“圣诞帽”主题素材,支持节日装扮与趣味互动。 kurogames_songlun_ridiculed 新增“松伦笑”表情系列,源自 Kurogames 名场面,适配娱乐与吐槽场景。
1 parent 81e13e8 commit b23f388

File tree

33 files changed

+192
-73
lines changed

33 files changed

+192
-73
lines changed

emoji/christmas_eve/__init__.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# 导入必要的模块
2+
from datetime import datetime
3+
from pathlib import Path
4+
5+
from PIL.Image import Image as IMG # 导入PIL的Image类并重命名为IMG
6+
from pil_utils import BuildImage # 导入用于构建和操作图像的BuildImage类
7+
8+
from meme_generator import add_meme # 导入添加meme模板的函数
9+
from meme_generator.utils import save_gif # 导入保存GIF的函数
10+
11+
# 获取当前文件所在目录的路径,并拼接images子目录路径
12+
img_dir = Path(__file__).parent / "images"
13+
14+
def christmas_eve(images: list[BuildImage], texts, args):
15+
16+
user_head = images[0].resize((118, 89)).convert("RGBA") #.circle()
17+
18+
# 初始化帧列表,用于存储每一帧图像
19+
frames: list[IMG] = []
20+
21+
positions = [
22+
(70, 120), (70, 120), (70, 120), # 1-3
23+
]
24+
25+
# 处理所有帧
26+
for i in range(3):
27+
frame_num = (i % 3) + 1
28+
frame = BuildImage.open(img_dir / f"{frame_num}.png").convert("RGBA")
29+
30+
# 创建一个新的图像,首先粘贴用户头像作为背景
31+
new_frame = BuildImage.new("RGBA", frame.size)
32+
new_frame.paste(user_head, positions[i], alpha=True)
33+
34+
# 然后将原始帧内容粘贴到上面
35+
new_frame.paste(frame, (0, 0), alpha=True)
36+
37+
frames.append(new_frame.image)
38+
39+
# 将所有帧保存为GIF,帧间隔为0.5秒
40+
return save_gif(frames, 0.5)
41+
42+
add_meme(
43+
"christmas_eve", # 模板的唯一标识符
44+
christmas_eve, # 处理函数
45+
min_images=1, # 需要的最小图片数量
46+
max_images=1, # 需要的最大图片数量
47+
keywords=["平安夜","平安夜快乐"], # 搜索关键词
48+
date_created=datetime(2025, 8, 18), # 创建日期
49+
date_modified=datetime(2025, 12, 9), # 修改日期
50+
)

emoji/christmas_eve/images/1.png

49 KB
Loading

emoji/christmas_eve/images/2.png

48.3 KB
Loading

emoji/christmas_eve/images/3.png

48.6 KB
Loading

emoji/christmas_hat/__init__.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from datetime import datetime
2+
from pathlib import Path
3+
4+
from pil_utils import BuildImage
5+
6+
from meme_generator import MemeArgsModel, add_meme
7+
from meme_generator.exception import TextOverLength
8+
from meme_generator.utils import make_jpg_or_gif
9+
10+
img_dir = Path(__file__).parent / "images"
11+
12+
13+
def christmas_hat(images: list[BuildImage], texts: list[str], args: MemeArgsModel):
14+
frame = BuildImage.open(img_dir / "0.png")
15+
16+
def make(imgs: list[BuildImage]) -> BuildImage:
17+
#头像尺寸
18+
img = imgs[0].convert("RGBA").circle().resize((821, 821))
19+
#头像坐标
20+
return frame.copy().paste(img, (352, 473), alpha=True,below=True)
21+
22+
return make_jpg_or_gif(images, make)
23+
24+
25+
add_meme(
26+
"christmas_hat",
27+
christmas_hat,
28+
min_images=1,
29+
max_images=1,
30+
min_texts=0,
31+
max_texts=0,
32+
keywords=["圣诞帽子","圣诞帽"],
33+
date_created=datetime(2025, 12, 6),
34+
date_modified=datetime(2025, 12, 6),
35+
)

emoji/christmas_hat/images/0.png

148 KB
Loading

emoji/huochailu/__init__.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

emoji/huochailu/images/0.png

-53.4 KB
Binary file not shown.

emoji/huochailu/images/1.png

-45 KB
Binary file not shown.

emoji/huochailu/images/2.png

-43 KB
Binary file not shown.

0 commit comments

Comments
 (0)