huangxin-design/blender-beginner / skills/huanghuayu-tutorial-video
huanghuayu-tutorial-video
Verified制作黄花鱼频道的复古科技风教程视频与封面,复用 CRT 电视视觉、中文字体、配音、稳定转场和荧光半调封面。将当前案例的真实作品、对话经验与工程讲解组织成一条 3:4 教程。适用于“复用黄花鱼教程模板”“按上次风格做教程/封面”;不用于单独建模或普通成片渲染。
scripts/image_backdrop.py
View on GitHub"""Keep a sharp fitted image over a soft backdrop made from the same image."""
from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageOps
def fit_with_backdrop(source, size):
source = source.convert('RGB')
foreground = ImageOps.contain(source, size, Image.Resampling.LANCZOS)
if foreground.size == size:
return foreground
background = ImageOps.fit(source, size, Image.Resampling.LANCZOS)
background = background.filter(ImageFilter.GaussianBlur(min(size) * .085))
# Align the palette with the fitted foreground, extending its end colors into padding.
fw, fh = foreground.size
column = source.resize((1, fh), Image.Resampling.BOX)
color_wash = Image.new('RGB', (1, size[1]))
offset_y = (size[1]-fh)//2
if offset_y:
color_wash.paste(column.getpixel((0, 0)), (0, 0, 1, offset_y))
color_wash.paste(column, (0, offset_y))
if offset_y+fh < size[1]:
color_wash.paste(column.getpixel((0, fh-1)), (0, offset_y+fh, 1, size[1]))
color_wash = color_wash.resize(size)
color_wash = color_wash.filter(ImageFilter.GaussianBlur(min(size) * .05))
background = Image.blend(background, color_wash, .92 if offset_y else .72)
background = ImageEnhance.Color(background).enhance(.98)
mask = Image.new('L', foreground.size, 0)
feather = max(4, round(min(size) * .018))
inset_x = feather if fw < size[0] else 0
inset_y = feather if fh < size[1] else 0
ImageDraw.Draw(mask).rectangle((inset_x, inset_y, fw-inset_x, fh-inset_y), fill=255)
mask = mask.filter(ImageFilter.GaussianBlur(feather*.7))
background.paste(foreground, ((size[0]-fw)//2, (size[1]-fh)//2), mask)
return background
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |