adobe-resize-photos-and-videos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Adobe Resize Photos and Videos

Adobe 照片与视频调整大小

Resizes images or videos to user-specified dimensions, aspect ratio, or named size. For social media platform sets (Instagram, TikTok, etc.) → use the
adobe-create-social-variations
skill instead.

将图像或视频调整为用户指定的尺寸、宽高比或命名尺寸。 如需针对社交媒体平台套装(Instagram、TikTok等)调整,请使用
adobe-create-social-variations
技能。

Tool Reference

工具参考

StepToolNotes
Open file picker
asset_add_file
Returns
presignedAssetUrl
,
assetId
, and
mediaType
Find asset in CC
asset_search
Re-stage result via
asset_add_file
for image; use
id
directly for video
Render PSD/AI
document_render_vector
Converts to JPEG before resize
Resize image
image_crop_and_resize
One call per dimension;
reframe
by default
Preview outputs
asset_preview_file
All outputs in a single call
Upload to CC (start)
asset_initialize_file_upload
First call in block upload pipeline
Upload to CC (finish)
asset_finalize_file_upload
Second call; returns presigned CC URL for board
Create Firefly board
create_firefly_board
Pass
import_adobe_storage
with finalize URL
Resize video
video_resize
Returns
statusId
for polling
Poll video resize
resizeVideoPoll
Deferred tool — load before calling

步骤工具说明
打开文件选择器
asset_add_file
返回
presignedAssetUrl
assetId
mediaType
在Creative Cloud中查找资源
asset_search
图片需通过
asset_add_file
重新托管结果;视频可直接使用
id
渲染PSD/AI文件
document_render_vector
调整大小前转换为JPEG格式
调整图片大小
image_crop_and_resize
每个尺寸调用一次;默认使用
reframe
模式
预览输出内容
asset_preview_file
单次调用即可预览所有输出
上传至Creative Cloud(开始)
asset_initialize_file_upload
分块上传流程中的首次调用
上传至Creative Cloud(完成)
asset_finalize_file_upload
第二次调用;返回用于面板的预签名Creative Cloud链接
创建Firefly面板
create_firefly_board
传入包含完成链接的
import_adobe_storage
参数
调整视频大小
video_resize
返回用于轮询的
statusId
轮询视频调整状态
resizeVideoPoll
延迟工具——调用前需先加载

Workflow

工作流程

Step 0 — Initialize Adobe Tools

步骤0 — 初始化Adobe工具

Call
adobe_mandatory_init
first. This returns file handling rules and tool routing guidance required for the rest of the workflow.
json
{ "skill_name": "adobe-resize-photos-and-videos", "skill_version": "1.0.1" }

首先调用
adobe_mandatory_init
。此调用会返回文件处理规则和工具路由指南,为后续工作流程提供必要支持。
json
{ "skill_name": "adobe-resize-photos-and-videos", "skill_version": "1.0.1" }

Step 1 — Entitlement Check

步骤1 — 权限检查

Now that
adobe_mandatory_init
confirmed that the "Adobe for creativity" connector is live, check which tools are available through the "Adobe for creativity" connector by cross checking against the Tool Reference table above.

adobe_mandatory_init
确认“Adobe for creativity”连接器已激活后,通过与上方工具参考表交叉核对,检查该连接器可使用的工具。

IMMEDIATE ACTION REQUIRED

需立即执行的操作

Step 1: If parameters are missing or ambiguous → run the multi-step intake (Step 2 below). Step 2: If no file is uploaded, run Step 3 (
asset_add_file({})
). Step 3: Detect image vs. video and route to the correct workflow (Step 5 Image/Video).

步骤1: 如果参数缺失或不明确 → 运行多步骤收集流程(下方步骤2)。 步骤2: 如果未上传文件,运行步骤3(
asset_add_file({})
)。 步骤3: 检测文件类型为图片还是视频,并路由至对应的工作流程(步骤5的图片/视频流程)。

Step 2 — Multi-Step Intake

步骤2 — 多步骤参数收集

Run this when the user hasn't provided complete parameters (type + dimensions + fit mode). Skip entirely if the user's message already contains all three.
Use
AskUserQuestion
to collect parameters step by step.
当用户未提供完整参数(类型+尺寸+适配模式)时运行此流程。 如果用户消息中已包含全部三个参数,则可直接跳过。
使用
AskUserQuestion
逐步收集参数。

Step 2a — Type

步骤2a — 文件类型

AskUserQuestion([{
  question: "Photo or video?",
  type: "single_select",
  options: ["Photo", "Video"]
}])
AskUserQuestion([{
  question: "照片还是视频?",
  type: "single_select",
  options: ["照片", "视频"]
}])

Step 2b — Dimensions

步骤2b — 尺寸

If Photo (
multi_select
— user can pick one or more):
AskUserQuestion([{
  question: "Dimensions — select all you need",
  type: "multi_select",
  options: [
    "1080 × 1080 — Instagram square",
    "1080 × 1350 — Instagram portrait",
    "1080 × 1920 — Stories / Reels",
    "1920 × 1080 — YouTube / landscape",
    "1280 × 720 — YouTube thumbnail",
    "1200 × 675 — X / Twitter post",
    "1200 × 630 — Facebook / OG image",
    "1080 × 566 — LinkedIn post",
    "2560 × 1440 — YouTube banner",
    "3840 × 2160 — 4K / UHD",
    "400 × 400 — Profile / avatar",
    "2480 × 3508 — A4 print (300 dpi)",
    "Custom — I'll type it"
  ]
}])
If user includes "Custom" → follow up: "Enter your custom dimensions (e.g. 1500×800):"
If user selects multiple presets → run
image_crop_and_resize
once per dimension, using the same source URI and parameters each time. Preview all outputs together at the end.
If Video (
multi_select
— user can pick one or more):
AskUserQuestion([{
  question: "Dimensions — select all you need",
  type: "multi_select",
  options: [
    "1080 × 1920 — Reels / TikTok / Stories",
    "1920 × 1080 — YouTube / landscape",
    "1080 × 1080 — Square post",
    "1280 × 720 — YouTube 720p",
    "3840 × 2160 — 4K / UHD",
    "854 × 480 — SD / 480p",
    "Custom — I'll type it"
  ]
}])
If user selects multiple video presets → submit a separate
video_resize
job per dimension, poll each to completion, preview all outputs together.
如果是照片
multi_select
——用户可选择一个或多个):
AskUserQuestion([{
  question: "尺寸——选择所有需要的选项",
  type: "multi_select",
  options: [
    "1080 × 1080 — Instagram正方形",
    "1080 × 1350 — Instagram竖版",
    "1080 × 1920 — 快拍/短视频",
    "1920 × 1080 — YouTube/横版",
    "1280 × 720 — YouTube缩略图",
    "1200 × 675 — X/Twitter帖子",
    "1200 × 630 — Facebook/OG图片",
    "1080 × 566 — LinkedIn帖子",
    "2560 × 1440 — YouTube横幅",
    "3840 × 2160 — 4K/UHD",
    "400 × 400 — 头像/个人资料图",
    "2480 × 3508 — A4打印(300 dpi)",
    "自定义——我将手动输入"
  ]
}])
如果用户选择“自定义” → 跟进提问:“输入你的自定义尺寸(例如1500×800):”
如果用户选择多个预设尺寸 → 针对每个尺寸调用一次
image_crop_and_resize
,每次使用相同的源URI和参数。最后统一预览所有输出内容。
如果是视频
multi_select
——用户可选择一个或多个):
AskUserQuestion([{
  question: "尺寸——选择所有需要的选项",
  type: "multi_select",
  options: [
    "1080 × 1920 — 短视频/TikTok/快拍",
    "1920 × 1080 — YouTube/横版",
    "1080 × 1080 — 正方形帖子",
    "1280 × 720 — YouTube 720p",
    "3840 × 2160 — 4K/UHD",
    "854 × 480 — 标清/480p",
    "自定义——我将手动输入"
  ]
}])
如果用户选择多个视频预设尺寸 → 针对每个尺寸提交单独的
video_resize
任务,轮询每个任务直至完成,最后统一预览所有输出内容。

Step 2c — Fit mode

步骤2c — 适配模式

If Photo (
single_select
):
AskUserQuestion([{
  question: "Fit mode",
  type: "single_select",
  options: [
    "Reframe — crop to fill",
    "Pad — letterbox, no crop",
    "Extract — isolate subject"
  ]
}])
If Video (
single_select
):
AskUserQuestion([{
  question: "Fit mode",
  type: "single_select",
  options: [
    "Letterbox — preserve ratio",
    "Crop — fill, no bars",
    "Stretch — force exact (distort)"
  ]
}])
如果是照片
single_select
):
AskUserQuestion([{
  question: "适配模式",
  type: "single_select",
  options: [
    "重新构图——裁剪填充",
    "添加黑边——留边不裁剪",
    "提取主体——隔离主体"
  ]
}])
如果是视频
single_select
):
AskUserQuestion([{
  question: "适配模式",
  type: "single_select",
  options: [
    "留边——保持比例",
    "裁剪——填充无黑边",
    "拉伸——强制适配(会变形)"
  ]
}])

Step 2d — Smart focus (Photo only)

步骤2d — 智能对焦(仅照片)

AskUserQuestion([{
  question: "Smart focus — where should the crop center?",
  type: "single_select",
  options: [
    "Subject",
    "Face / portrait",
    "Upper body",
    "Center (geometric)",
    "Named object — I'll describe it"
  ]
}])
If user selects "Named object" → follow up: "Describe the object (e.g. 'the red car', 'the logo'):"
AskUserQuestion([{
  question: "智能对焦——裁剪应聚焦于何处?",
  type: "single_select",
  options: [
    "主体",
    "人脸/肖像",
    "上半身",
    "中心(几何中心)",
    "指定对象——我将描述它"
  ]
}])
如果用户选择“指定对象” → 跟进提问:“描述该对象(例如‘红色汽车’、‘标志’):”

Step 2e — Options (Photo only)

步骤2e — 附加选项(仅照片)

AskUserQuestion([{
  question: "Any additional options?",
  type: "multi_select",
  options: [
    "Batch — multiple images",
    "Output: JPEG",
    "Output: PNG"
  ]
}])
AskUserQuestion([{
  question: "是否有其他附加选项?",
  type: "multi_select",
  options: [
    "批量处理——多张图片",
    "输出格式:JPEG",
    "输出格式:PNG"
  ]
}])

Step 2f — Source (Video only)

步骤2f — 来源(仅视频)

AskUserQuestion([{
  question: "Where is the video?",
  type: "single_select",
  options: [
    "Upload from device",
    "From Creative Cloud"
  ]
}])

AskUserQuestion([{
  question: "视频来自何处?",
  type: "single_select",
  options: [
    "从设备上传",
    "来自Creative Cloud"
  ]
}])

Step 3 — Get the Source File

步骤3 — 获取源文件

Critical —
/mnt/user-data/uploads/
paths are NOT usable URLs.
Even when the user has attached a file and it appears in context at a
/mnt/user-data/uploads/
path, you cannot pass this path to any Adobe tool. Call
asset_add_file()
to stage the file —
/mnt/user-data/uploads/
paths are not fetchable by Adobe tools.
WRONG  ❌  imageURI: "/mnt/user-data/uploads/photo.jpg"
WRONG  ❌  imageURI: "file:///mnt/user-data/uploads/photo.jpg"
CORRECT ✅  call asset_add_file() → use presignedAssetUrl from picker context
No file yet → open the picker immediately:
javascript
asset_add_file()
Detect type from returned
mediaType
:
  • image/*
    → IMAGE WORKFLOW
  • video/*
    → VIDEO WORKFLOW

重要提示 —
/mnt/user-data/uploads/
路径不可用作URL。
即使用户已附加文件且在上下文显示为
/mnt/user-data/uploads/
路径,也不能将此路径传递给任何Adobe工具。请调用
asset_add_file()
托管文件——Adobe工具无法获取
/mnt/user-data/uploads/
路径的文件。
错误 ❌  imageURI: "/mnt/user-data/uploads/photo.jpg"
错误 ❌  imageURI: "file:///mnt/user-data/uploads/photo.jpg"
正确 ✅  调用asset_add_file() → 使用选择器上下文返回的presignedAssetUrl
尚未上传文件 → 立即打开选择器:
javascript
asset_add_file()
从返回的
mediaType
检测文件类型:
  • image/*
    → 图片工作流程
  • video/*
    → 视频工作流程

Step 4 — Resolve Target Dimensions

步骤4 — 解析目标尺寸

User saysResolve to
1920×1080
,
1920x1080
width: 1920, height: 1080
4K
3840 × 2160
HD
,
1080p
1920 × 1080
720p
1280 × 720
480p
854 × 480
A4
print
2480 × 3508 (300 DPI portrait)
Letter
print
2550 × 3300 (300 DPI portrait)
16:9
,
1:1
,
4:5
,
9:16
ratio string → pass as
output: "16:9"
square
output: "1:1"
Width only (
800px wide
)
width: 800, use ratio string to maintain aspect
If no target was specified in the form AND none in the user's message → ask:
"What dimensions do you need? (e.g. 1920×1080, A4, 16:9)"

用户表述解析结果
1920×1080
,
1920x1080
宽度: 1920, 高度: 1080
4K
3840 × 2160
HD
,
1080p
1920 × 1080
720p
1280 × 720
480p
854 × 480
A4
打印
2480 × 3508 (300 DPI竖版)
Letter
打印
2550 × 3300 (300 DPI竖版)
16:9
,
1:1
,
4:5
,
9:16
比例字符串 → 作为
output: "16:9"
传递
square
(正方形)
output: "1:1"
仅指定宽度(
800px宽
宽度: 800, 使用比例字符串保持宽高比
如果表单中未指定目标尺寸且用户消息中也未提及 → 提问:
"你需要什么尺寸?(例如1920×1080、A4、16:9)"

IMAGE WORKFLOW

图片工作流程

Step 5 (Image) — Valid URI Sources

步骤5(图片)—— 有效URI来源

Only these work as
imageURI
:
  • presignedAssetUrl
    from
    asset_add_file()
  • outputUrl
    from a prior tool call ✅
  • Public HTTPS URL provided by user ✅
Not usable as
imageURI
:
  • /mnt/user-data/uploads/
    paths ❌
  • renditionURL
    from
    asset_search
    directly ❌
  • file://
    URIs ❌
SourceResolution
Uploaded file
asset_add_file()
presignedAssetUrl
CC storage asset
asset_search
→ re-stage via
asset_add_file()
presignedAssetUrl
Prior tool outputUse
outputUrl
directly
PSD / AI file
document_render_vector
(JPEG, 300 DPI) →
outputPresignedUrl

仅以下来源可作为
imageURI
  • asset_add_file()
    返回的
    presignedAssetUrl
  • 之前工具调用返回的
    outputUrl
  • 用户提供的公开HTTPS URL ✅
不可用作
imageURI
的来源:
  • /mnt/user-data/uploads/
    路径 ❌
  • asset_search
    直接返回的
    renditionURL
  • file://
    URI ❌
来源处理方式
上传的文件
asset_add_file()
presignedAssetUrl
Creative Cloud存储资源
asset_search
→ 通过
asset_add_file()
重新托管 →
presignedAssetUrl
之前工具输出直接使用
outputUrl
PSD / AI文件
document_render_vector
(JPEG,300 DPI) →
outputPresignedUrl

Step 6 (Image) — Fit Mode

步骤6(图片)—— 适配模式

IntentModeNotes
"resize to WxH" / default
reframe
Largest crop at target ratio, centered — no distortion
"no cropping", "letterbox", "fit inside"
pad
Fills empty space with white
"isolate subject", "tight crop"
extract
Tight crop around detected region
Default:
reframe
.
Change only when user is explicit.
fit: "extract"
is incompatible with an explicit
{ width, height }
— it stretches the image. Use a ratio string or omit
output
.

用户意图模式说明
"调整为宽×高" / 默认
reframe
目标比例下最大裁剪范围,居中——无变形
"不裁剪"、"留边"、"适配内部"
pad
空白区域填充白色
"隔离主体"、"紧密裁剪"
extract
围绕检测到的区域进行紧密裁剪
默认值:
reframe
仅当用户明确要求时才更改。
fit: "extract"
与明确的
{ width, height }
参数不兼容——会导致图像拉伸。请使用比例字符串或省略
output
参数。

Step 7 (Image) — Call
image_crop_and_resize

步骤7(图片)—— 调用
image_crop_and_resize

javascript
image_crop_and_resize({
  imageURI: presignedAssetUrl,
  options: {
    output: { width: 1920, height: 1080 },  // or "16:9"
    fit: "reframe",
    focus: "subject",  // or "face", "upper_body", { prompt: "the car" }, { x:0.5, y:0.5 }
    quality: 7
  },
  outputFileType: "jpeg"  // or "png" if transparency needed
})
// result.outputUrl → use for preview or chaining
Focus guide:
  • "subject"
    — default; full-body detection, landscapes, objects
  • "face"
    — portraits, headshots
  • "upper_body"
    — chest-up crops
  • { prompt: "the logo" }
    — named object from user's form input
  • { x: 0.5, y: 0.5 }
    — geometric center (no clear subject)

javascript
image_crop_and_resize({
  imageURI: presignedAssetUrl,
  options: {
    output: { width: 1920, height: 1080 },  // 或"16:9"
    fit: "reframe",
    focus: "subject",  // 或"face"、"upper_body"、{ prompt: "the car" }、{ x:0.5, y:0.5 }
    quality: 7
  },
  outputFileType: "jpeg"  // 如需透明背景则使用"png"
})
// result.outputUrl → 用于预览或链式调用
对焦指南:
  • "subject"
    — 默认值;检测全身、风景、物体
  • "face"
    — 肖像、头像
  • "upper_body"
    — 胸部以上裁剪
  • { prompt: "the logo" }
    — 用户表单输入的指定对象
  • { x: 0.5, y: 0.5 }
    — 几何中心(无明确主体时)

Step 8 (Image) — Batch

步骤8(图片)—— 批量处理

If batch was selected in the form OR the user provided multiple files:
  1. Call
    asset_add_file()
    for each file to get individual presigned URLs
  2. Call
    image_crop_and_resize
    for each with the same parameters
  3. Collect all
    outputUrl
    values
  4. Call
    asset_preview_file
    with all outputs in a single call
Calls run sequentially in this environment. For >10 images, confirm with the user before starting.
Pagination across turns (batches >20): For large batches, the conversation context may fill before all images are processed, causing Claude to pause mid-batch. This is expected — not an error. When it happens:
  • State how many have been completed and how many remain (e.g. "20 / 24 done — say 'continue' for the rest")
  • Wait for the user to confirm before resuming
  • On resume, pick up from the next unprocessed image and continue to the end
  • Preview all outputs together only after the final image completes

如果表单中选择了批量处理,或用户提供了多个文件:
  1. 为每个文件调用
    asset_add_file()
    获取单独的预签名URL
  2. 为每个文件调用
    image_crop_and_resize
    ,使用相同的参数
  3. 收集所有
    outputUrl
  4. 单次调用
    asset_preview_file
    预览所有输出内容
在此环境中调用会按顺序执行。如果图片数量超过10张,请在开始前与用户确认。
跨轮次分页(批量超过20张): 对于大规模批量处理,对话上下文可能在所有图片处理完成前就被填满,导致Claude在批量处理中途暂停。这是正常现象——并非错误。发生这种情况时:
  • 告知用户已完成数量和剩余数量(例如“已完成20/24张——输入‘继续’以处理剩余部分”)
  • 等待用户确认后再继续
  • 继续处理时,从下一张未处理的图片开始,直至完成
  • 仅在所有图片处理完成后统一预览所有输出内容

Step 9 (Image) — Preview + Deliver + Firefly Board

步骤9(图片)—— 预览 + 交付 + Firefly面板

javascript
asset_preview_file({
  assets: [
    { name: "photo_1920x1080.jpg", presignedAssetUrl: result.outputUrl },
    // all successful outputs
  ]
})
javascript
asset_preview_file({
  assets: [
    { name: "photo_1920x1080.jpg", presignedAssetUrl: result.outputUrl },
    // 所有成功的输出内容
  ]
})

Save to CC + Create Firefly Board

保存至Creative Cloud + 创建Firefly面板

After preview, upload each output to CC storage using the block upload pipeline (
asset_initialize_file_upload
→ PUT chunk →
asset_finalize_file_upload
).
Then call the firefly board tool with the final output urls:
javascript
create_firefly_board({
  import_adobe_storage: [
    final_output_url_1,
    final_output_url_2,
    // ...
  ]
})
Confirmed working (Stage):
import_adobe_storage
with presigned URLs from
asset_finalize_file_upload
successfully populates boards.
Does not work:
import_generic_assets
with CC URNs (
urn:aaid:sc:US:...
) — USS indexing lag causes blank boards.
If board creation fails or the URL is malformed, omit the board link (retrying does not help).
Post the completion summary after the board step:
✅ Done! [N] image(s) resized and ready.

📥 Download:
• resized_1920x1080.jpg → <cc_storage_url>
[list individually if N ≤ 3, or single folder link if N > 3]

🎨 View in Firefly Board → <board_url>   ← omit if board creation failed

预览后,使用分块上传流程(
asset_initialize_file_upload
→ PUT分块 →
asset_finalize_file_upload
)将每个输出内容上传至Creative Cloud存储。
然后调用Firefly面板工具,传入最终输出链接:
javascript
create_firefly_board({
  import_adobe_storage: [
    final_output_url_1,
    final_output_url_2,
    // ...
  ]
})
已确认可正常工作(测试阶段): 使用
asset_finalize_file_upload
返回的预签名URL传入
import_adobe_storage
可成功填充面板。
无法工作: 使用Creative Cloud URN(
urn:aaid:sc:US:...
)传入
import_generic_assets
——USS索引延迟会导致面板空白。
如果面板创建失败或链接格式错误,请省略面板链接(重试无济于事)。
完成面板步骤后发布完成总结:
✅ 完成!已调整[N]张图片大小,可随时使用。

📥 下载:
• resized_1920x1080.jpg → <cc_storage_url>
[N≤3时逐个列出,N>3时提供单个文件夹链接]

🎨 在Firefly面板中查看 → <board_url>   ← 面板创建失败时省略

VIDEO WORKFLOW

视频工作流程

Step 5 (Video) — Get Asset ID

步骤5(视频)—— 获取Asset ID

Video tools require
assetId
, not a URL.
SourceHow
Upload via
asset_add_file
Use returned
assetId
CC storage
asset_search
with
filters.mediaType: "video/mp4"
→ use asset
id

视频工具需要
assetId
,而非URL。
来源操作方式
通过
asset_add_file
上传
使用返回的
assetId
Creative Cloud存储使用
asset_search
并设置
filters.mediaType: "video/mp4"
→ 使用资源
id

Step 6 (Video) — Common Targets

步骤6(视频)—— 常见目标尺寸

NameDimensions
4K / UHD3840 × 2160
1080p / HD1920 × 1080
720p1280 × 720
480p854 × 480
Vertical 9:161080 × 1920
Square 1:11080 × 1080

名称尺寸
4K / UHD3840 × 2160
1080p / HD1920 × 1080
720p1280 × 720
480p854 × 480
竖版9:161080 × 1920
正方形1:11080 × 1080

Step 7 (Video) — Call
video_resize

步骤7(视频)—— 调用
video_resize

⚠️
resizeVideoPoll
is a deferred tool — load it first before attempting to poll. Direct calls without loading will fail with "not loaded" error.
javascript
video_resize({
  assetId: videoAssetId,
  width: targetW,
  height: targetH,
  mode: "letterbox"  // default; see mode table below
})
// Returns { jobStatus: "pending", statusId }
Mode — use exact API values (not user-facing labels):
User saysAPI valueBehavior
"fit", "preserve ratio", "letterbox"
"letterbox"
Preserves ratio, adds black bars (default)
"fill", "crop to fill", "no bars"
"crop"
Crops edges to fill target exactly
"stretch", "force exact"
"stretch"
Distorts to exact target
ℹ️ Auto-reframe for video is not available in Claude yet, but new tools are being added all the time. If you need more control, try using Adobe Premiere.
Polling: load the deferred tool
resizeVideoPoll
before calling it — direct calls fail with "not loaded".
javascript
// Step 1: load the deferred tool resizeVideoPoll
// Step 2: poll until complete
resizeVideoPoll({ statusId })
// Repeat until jobStatus === "completed"
// Show progress % to user while waiting

⚠️
resizeVideoPoll
延迟工具——调用前需先加载。 未加载直接调用会返回“未加载”错误。
javascript
video_resize({
  assetId: videoAssetId,
  width: targetW,
  height: targetH,
  mode: "letterbox"  // 默认值;见下方模式表
})
// 返回 { jobStatus: "pending", statusId }
模式——使用精确的API值(而非用户友好标签):
用户表述API值行为
"适配"、"保持比例"、"留边"
"letterbox"
保持比例,添加黑边(默认值)
"填充"、"裁剪填充"、"无黑边"
"crop"
裁剪边缘以完全适配目标尺寸
"拉伸"、"强制适配"
"stretch"
变形以完全适配目标尺寸
ℹ️ 目前Claude中暂不支持视频自动重新构图,但新工具正在持续添加中。如需更多控制,请尝试使用Adobe Premiere。
轮询: 调用前先加载延迟工具
resizeVideoPoll
——直接调用会返回“未加载”错误。
javascript
// 步骤1:加载延迟工具resizeVideoPoll
// 步骤2:轮询直至完成
resizeVideoPoll({ statusId })
// 重复调用直至jobStatus === "completed"
// 等待期间向用户显示进度百分比

Step 8 (Video) — Preview + Deliver + Firefly Board

步骤8(视频)—— 预览 + 交付 + Firefly面板

If polling succeeds and returns
outputUrl
, upload to CC storage via the block upload pipeline (
asset_initialize_file_upload
→ PUT →
asset_finalize_file_upload
) to get a presigned URL, then:
javascript
asset_preview_file({
  assets: [{ name: "resized_video.mp4", presignedAssetUrl: result.outputUrl }]
})

create_firefly_board({
  import_adobe_storage: [ presignedAssetUrl_from_finalize ]
})
✅ Pass
import_adobe_storage
with the finalize presigned URL. If board creation fails, omit the link.
✅ Done! Video resized to [WxH].

📥 Download → <cc_storage_url>

🎨 View in Firefly Board → <board_url>   ← omit if board creation failed
If polling is unavailable → skip preview, deliver the CC storage fallback message from Step 7.

如果轮询成功并返回
outputUrl
,通过分块上传流程(
asset_initialize_file_upload
→ PUT →
asset_finalize_file_upload
)上传至Creative Cloud存储以获取预签名URL,然后:
javascript
asset_preview_file({
  assets: [{ name: "resized_video.mp4", presignedAssetUrl: result.outputUrl }]
})

create_firefly_board({
  import_adobe_storage: [ presignedAssetUrl_from_finalize ]
})
✅ 将
import_adobe_storage
与完成步骤的预签名URL一起传递。如果面板创建失败,请省略链接。
✅ 完成!视频已调整为[宽×高]。

📥 下载 → <cc_storage_url>

🎨 在Firefly面板中查看 → <board_url>   ← 面板创建失败时省略
如果轮询不可用 → 跳过预览,使用步骤7中的Creative Cloud存储备用消息交付。

Error Handling

错误处理

ErrorAction
/mnt/user-data/uploads/
or
file://
passed as URI
Stop. Call
asset_add_file()
first.
Image too large after resizeRe-run with
quality: 5
Video
assetId
not found
Re-upload via
asset_add_file
Source too small for targetWarn user upscaling won't add detail; proceed if confirmed
Invalid
video_resize
mode
API only accepts
"letterbox"
,
"crop"
, or
"stretch"
"fit"
and
"fill"
will be rejected.
extract
+
{W,H}
→ stretching
Switch to
reframe
No dimensions givenRender form or ask explicitly before calling any tool
Unsupported formatAsk user to export as JPG/PNG (images) or MP4 (video)
resizeVideoPoll
not loaded / unavailable
Known gap in current connector. Skip polling. Tell user to check CC Files for output.

错误操作
/mnt/user-data/uploads/
file://
作为URI传递
停止操作。先调用
asset_add_file()
调整大小后图片过大使用
quality: 5
重新运行
未找到视频
assetId
通过
asset_add_file
重新上传
源文件尺寸小于目标尺寸警告用户放大不会增加细节;用户确认后再继续
video_resize
模式无效
API仅接受
"letterbox"
"crop"
"stretch"
——
"fit"
"fill"
会被拒绝。
extract
+
{宽,高}
→ 拉伸
切换为
reframe
模式
未提供尺寸在调用任何工具前,渲染表单或明确提问
不支持的格式请用户导出为JPG/PNG(图片)或MP4(视频)
resizeVideoPoll
未加载/不可用
当前连接器的已知问题。跳过轮询。告知用户查看Creative Cloud文件获取输出内容。

Common Dimension Reference

常见尺寸参考

Use CaseDimensions
Full HD / web hero1920 × 1080
4K3840 × 2160
Web thumbnail1280 × 720
Square1080 × 1080
A4 print (300 DPI)2480 × 3508
US Letter print (300 DPI)2550 × 3300
Blog featured image1200 × 630
Email header600 × 200
Avatar / profile400 × 400
Instagram portrait1080 × 1350
Stories / Vertical1080 × 1920

使用场景尺寸
全高清/网页横幅1920 × 1080
4K3840 × 2160
网页缩略图1280 × 720
正方形1080 × 1080
A4打印(300 DPI)2480 × 3508
US Letter打印(300 DPI)2550 × 3300
博客特色图片1200 × 630
邮件标题600 × 200
头像/个人资料400 × 400
Instagram竖版1080 × 1350
快拍/竖版1080 × 1920

Assets

资源

assets/intake-form.html
— Interactive intake form for resize parameters. Render at the start of any resize workflow where parameters are missing or ambiguous. Covers photo (target size, fit mode, smart focus, batch, output format) and video (target size, fit mode, source).
assets/intake-form.html
— 用于调整大小参数的交互式收集表单。 当调整大小工作流程中参数缺失或不明确时,在开始时渲染此表单。涵盖照片(目标尺寸、适配模式、智能对焦、批量处理、输出格式)和视频(目标尺寸、适配模式、来源)的参数收集。