跳到主要内容
知仓学习社ZHICANG

title-card-image

Render a static title / ending card PNG with Pillow. Centered headline + optional subtitle on a solid-colour background. Uses managed or platform CJ…

读凭据严重 0 · 高危 3TokenRhythm/opensquilla

它会碰到什么

扫了多少2 个文本文件,16 KB
它会碰到什么读凭据
命中总数3 处
命中统计严重 0 · 高 3 · 中 0 · 低 0
逐条看命中(3 条严重或高危)
  • scripts/render.py:67cred-envread
    managed = (os.environ.get(_MEDIA_FONTS_DIR_ENV) or "").strip()
  • scripts/render.py:84cred-envread
    local_appdata = (os.environ.get("LOCALAPPDATA") or "").strip()
  • scripts/render.py:120cred-envread
    windows_dir = Path(os.environ.get("WINDIR") or r"C:\Windows") / "Fonts"

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

title-card-image

Renders a centered-text PNG suitable for a cover / ending card before

animating into a clip with video-still-animator.

Inputs (with:)

| key | required | default | notes |

|---|---|---|---|

| text | yes | — | Headline text. Auto-wraps at ~10 chars per line for CJK. |

| output | yes | — | Output .png path. |

| subtitle | no | "" | Smaller line beneath the headline. |

| background | no | #101018 | Hex color #RRGGBB. |

| text_color | no | #ffffff | Headline color. |

| font_size | no | 96 | Headline font size in pixels. |

| subtitle_size | no | 36 | Subtitle font size in pixels. |

| width | no | 720 | Output width in pixels. Match the merge pipeline. |

| height | no | 1280 | Output height. 720x1280 = 9:16. |

| font | no | "" | Optional .ttf, .otf, or .ttc path. Must contain the requested CJK glyphs. |

Output

Prints the absolute path of the written PNG on stdout. The PNG is RGB

(no alpha), JPEG-quality-equivalent file ~30-80 KB depending on text

length.

Font fallback

Resolution order is --font, the managed media directory from

OPENSQUILLA_MEDIA_FONTS_DIR, user font directories, then platform defaults:

Microsoft YaHei / SimHei / DengXian on Windows; PingFang / Hiragino Sans GB /

STHeiti / Songti on macOS; Noto CJK / Source Han / WenQuanYi on Linux. Font

collection files (.ttc/.otc) are supported. Before drawing, the renderer

compares requested non-ASCII glyphs with the font's missing-glyph signature. A font

that would produce tofu is skipped. If no compatible scalable font exists, the

step fails with an actionable --font / OPENSQUILLA_MEDIA_FONTS_DIR message

for CJK or other non-ASCII text; it never silently emits tiny bitmap squares.

Pure ASCII cards remain available on minimal systems through Pillow's built-in

font when no scalable font is installed.

Limits

  • No alpha / transparency.
  • No rich text styling (italic / drop-shadow / gradient). For richer

cards, generate a real image via nano-banana-pro instead.

  • Headline wrap is character-count-based for CJK and whitespace-based

for ASCII; mixed strings break at the CJK character count.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 7,018
本站分层T1
该仓技能数68
原文件路径src/opensquilla/skills/bundled/title-card-image/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 68 个技能