resize-marketing-images

Extend a single image with AI into multiple aspect ratios, producing versions formatted for common specifications such as Xiaohongshu, Douyin, and public account (WeChat) covers.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "resize-marketing-images" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7c2e1927330ece368b10b8825b60ad139f4c68180530f4e3b58fbdc82ff23038. Verify the upstream source and version against https://skillhub.cn/skills/user_01e09be1/resize-marketing-images before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Extend a single image with AI into multiple aspect ratios, producing versions formatted for common specifications such as Xiaohongshu, Douyin, and public account (WeChat) covers.

0 Downloads

Introduction source: third_party · user_01e09be1 · 1.0.2 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: resize-marketing-images
description: 使用用户自己的火山方舟 Seedream API,把一张横图、竖图、方图、营销图、海报、商品图或封面进行真实 AI 扩图与智能重构,再批量输出小红书、抖音、视频号、公众号、朋友圈、微博、B站和电商主图等常用规格,并生成预览、规格清单、manifest 和 ZIP。用户提到扩图、续画、图片改尺寸、改规格、一图多尺寸、横图变竖图、竖图变横图、全平台适配、社媒封面或营销图批量适配时使用。
slug: resize-marketing-images
version: 1.0.2
displayName: AI图片一键扩成全平台尺寸
summary: 一张图按不同画幅分别AI续画,生成小红书、抖音、公众号等常用规格
tags: [AI扩图, 图片改尺寸, 营销图片, 小红书, 抖音, 社媒运营]
license: MIT
iconUrl: https://skillhub-1388575217.cos.accelerate.myqcloud.com/skill-icons/uploads/597133/81bbbc13eadc48d687c270aaade57a8d.png

AI 图片一键扩成全平台尺寸

把一张已有图片交给火山方舟 Seedream,真正续画缺失的天空、地面、环境和空间,再输出各平台精确像素成品。默认不是裁剪、拉伸或模糊补边。

一张原图经 AI 智能扩图生成横版、竖版、方图和超宽画幅的真实效果

一张图,分别按目标画幅重新生成完整场景;横版、竖版、方图和超宽图都不是简单裁剪或模糊补边。

核心原则

  1. 默认使用 ai-outpaint + natural + quality:每一种独立画幅都生成全出血、无相框、无拼贴的新画面,相同比例才复用。
  2. 自然扩图是语义级保真。它会尽量保持主体、风格和叙事关系,但不能保证文字、Logo、二维码或包装细节逐像素不变。
  3. 图片会上传到用户自己的火山方舟账户处理,费用由用户承担。
  4. 真实调用前先执行 --plan,向用户报告调用次数和估算费用。只有用户明确确认后才传 --yes。
  5. 不覆盖输入图,不持久化 API Key,不把密钥、Base64 图片、完整 Prompt 或输入绝对路径写进 ZIP。
  6. 不得把 cover、contain-blur 或 contain-solid 的本地结果描述为 AI 扩图。

执行流程

1. 确定输入和目标

确认输入图片绝对路径。用户未指定平台时,默认使用 cn-social-core:

  • 小红书图文封面;
  • 抖音竖版封面;
  • 视频号竖版封面;
  • 公众号头图;
  • 朋友圈营销海报;
  • 微博视频封面;
  • B站视频封面;
  • 电商主图方图。

用户给出后台明确尺寸时,优先使用 --custom WxH。

2. 检查运行环境

首次使用时安装依赖:

python3 -m pip install -r "{baseDir}/requirements.txt"

然后诊断:

python3 "{baseDir}/scripts/resize_marketing_images.py" --doctor --json

推荐的密钥环境变量是 VOLC_ARK_API_KEY。脚本兼容:

  1. VOLC_ARK_API_KEY
  2. VOLC_ARK_CUSTOMER_KEY
  3. ARK_API_KEY
  4. VOLC_API_KEY
  5. VOLCENGINE_API_KEY

如果没有 Key,告诉用户只需在自己的终端配置火山方舟 API Key。不要让用户把 Key 贴进对话,不要自动修改 shell 配置,也不要把 Key 作为命令行参数。

3. 先生成无费用计划

python3 "{baseDir}/scripts/resize_marketing_images.py" \
  "/absolute/path/to/input.png" \
  --bundle cn-social-core \
  --strategy quality \
  --plan \
  --json

向用户说明:

  • 计划生成哪些规格;
  • 预计 AI 调用次数;
  • 估算费用;
  • 原图会上传到火山方舟;
  • 自然扩图不能保证文字和 Logo 逐像素不变。

默认 quality 策略按每一种独立画幅分别 AI 重构。常用 8 规格通常包含 6 至 7 种独立画幅,按当前 Seedream 5.0 估算约 ¥1.32 至 ¥1.54。

用户明确更看重成本时才使用 --strategy economy。该策略只生成最窄和最宽两个 AI 母版,再裁切派生中间比例,通常约 2 次调用、估算约 ¥0.44;必须向用户说明部分规格不是单独 AI 重构。

4. 用户确认后执行

python3 "{baseDir}/scripts/resize_marketing_images.py" \
  "/absolute/path/to/input.png" \
  --bundle cn-social-core \
  --strategy quality \
  --yes \
  --output "/absolute/path/to/output" \
  --json

指定多个平台:

python3 "{baseDir}/scripts/resize_marketing_images.py" \
  "/absolute/path/to/input.jpg" \
  --preset xhs-note-cover \
  --preset douyin-vertical-cover \
  --preset wechat-article-cover \
  --strategy quality \
  --yes \
  --output "/absolute/path/to/output" \
  --json

自定义尺寸:

python3 "{baseDir}/scripts/resize_marketing_images.py" \
  "/absolute/path/to/input.jpg" \
  --custom 1080x1920 \
  --custom 1920x1080 \
  --strategy quality \
  --yes \
  --output "/absolute/path/to/output" \
  --json

用户对场景有补充要求时可使用 --prompt-extra,但不要在日志或最终报告中复述可能包含敏感信息的完整 Prompt。

5. 检查交付物

默认交付:

  • 每个平台一张精确像素成品图;
  • 全平台预览.jpg;
  • 规格清单.md;
  • manifest.json;
  • 全平台营销图片包.zip。

生成后必须检查:

  1. 输出尺寸是否精确;
  2. 是否出现相框、卡片、画中画、拼贴或留白;
  3. 是否出现重复人物、重复商品或新增乱码;
  4. 核心主体是否完整;
  5. 文字、Logo、二维码和商品包装是否可接受。

向用户返回输入、代表性输出、预览和 ZIP 的绝对路径,并明确报告实际 AI 调用次数、模型与估算费用。不要声称平台审核一定通过。

本地模式只作为用户主动选择的替代方案

用户明确说“不上传、不调用 API”时可使用:

模式 行为 是否 AI 扩图
cover 裁切并铺满,不拉伸 否
contain-blur 完整保留原图,补模糊背景 否
contain-solid 完整保留原图,补纯色背景 否

示例:

python3 "{baseDir}/scripts/resize_marketing_images.py" \
  "/absolute/path/to/input.jpg" \
  --bundle cn-social-core \
  --mode contain-blur \
  --output "/absolute/path/to/output"

高风险素材

遇到以下素材要提前说明风险并要求用户重点验收:

  • 大段中文文案;
  • Logo、二维码、价格、日期和合规小字;
  • 商品包装正面;
  • 对人物脸部、服装或手部要求极高的品牌素材。

若这些内容绝对不能变化,优先建议用户使用本地 contain-blur 或重新进行专业排版;不要用自然 AI 扩图做“100% 不变”的承诺。

查看规格

python3 "{baseDir}/scripts/resize_marketing_images.py" --list-presets

规格库、来源类型和维护信息位于 {baseDir}/references/platform-presets.json。平台规则会变化;用户后台给出的明确尺寸优先于内置预设。

Current listing version

1.0.2

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 解决营销图片多平台适配的高频刚需,支持 AI 扩图与批量输出
  • 覆盖小红书、抖音、公众号等主流平台,具备明确商业价值
Trigger Precision92/100

Highlights

  • 触发词精准完整,覆盖扩图、续画、改尺寸、全平台适配等多种变体
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards90/100

Highlights

  • Phase 清晰,含端到端示例与多种使用场景
  • frontmatter 完整,文档结构规范
Execution Reliability88/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常处理
  • 不可逆操作有用户确认机制,费用透明
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 52
  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 27, 61, 69
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • skillhub-1388575217.cos.accelerate.myqcloud.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.