feat: 新增代码

This commit is contained in:
Daniel
2026-04-07 00:37:39 +08:00
commit 8d0b729f2f
29 changed files with 1768 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
def make_dummy_frame(path: Path, width: int, height: int, text: str, step: int) -> None:
image = Image.new("RGB", (width, height), color=(25 + step * 5 % 200, 40, 60))
draw = ImageDraw.Draw(image)
font = ImageFont.load_default()
draw.text((16, 16), text, fill=(240, 240, 240), font=font)
draw.text((16, 38), f"frame={step}", fill=(220, 220, 220), font=font)
image.save(path, format="JPEG", quality=90)