adobe-batch-edit-photos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Adobe Batch Edit Photos

Adobe批量编辑照片

A batch editing pipeline focused on visual cohesion — making a set of photos look like they were edited together. The user picks a look (or describes one), and Claude applies it consistently across every image using Adobe creativity tools.
The core insight: users who want "cohesion" care less about per-image perfection and more about the whole set reading as intentional. Prioritize consistency of tone and color over squeezing the best out of any single image.

这是一套专注于视觉风格统一的批量编辑流程——让一组照片看起来像是经过统一编辑的。用户选择一种风格(或描述一种风格),Claude会使用Adobe创意工具将该风格统一应用到每一张图片上。
核心思路:想要“风格统一”的用户更在意整套照片看起来是经过精心设计的,而非单张照片的完美效果。要优先保证色调和色彩的一致性,而非追求单张照片的极致效果。

Tool Reference

工具参考

StepToolNotes
Ingest
asset_add_file
Interactive file picker
Straighten
image_auto_straighten
Per image
Auto-tone
image_apply_auto_tone
Per image,
type: "cameraRawFilter"
Exposure
image_adjust_exposure
Batch — fine-tune option (brighter/darker)
Highlights
image_adjust_highlights
Batch — fine-tune option
Shadows
image_adjust_dark_portions
Batch — fine-tune option
Bright areas
image_adjust_light_portions
Batch — fine-tune option
Brightness/Contrast
image_adjust_brightness_and_contrast
Batch, if requested
Vibrance/Saturation
image_adjust_vibrance_and_saturation
Batch, if requested
Color temperature
image_adjust_color_temperature
Batch — key for "warm", "cool", "golden" looks
Look preset
image_apply_preset
Per image, core style vehicle
Face detect
image_select_subject
with
bodyParts: ["Face"]
Per image, only if crop focus needed
Background blur
image_apply_gaussian_blur
Per image, only if explicitly requested
Crop
image_crop_and_resize
Per image, optional
Sample preview
asset_preview_file
Before/after on image[0] only
Final preview
asset_preview_file
Batch assets array
Firefly Board
create_firefly_board
All edited outputs

步骤工具说明
导入
asset_add_file
交互式文件选择器
自动扶正
image_auto_straighten
单张图片处理
自动调色
image_apply_auto_tone
单张图片处理,
type: "cameraRawFilter"
曝光调整
image_adjust_exposure
批量处理——支持微调选项(调亮/调暗)
高光调整
image_adjust_highlights
批量处理——支持微调选项
阴影调整
image_adjust_dark_portions
批量处理——支持微调选项
亮部调整
image_adjust_light_portions
批量处理——支持微调选项
亮度/对比度调整
image_adjust_brightness_and_contrast
批量处理,仅在用户要求时执行
自然饱和度/饱和度调整
image_adjust_vibrance_and_saturation
批量处理,仅在用户要求时执行
色温调整
image_adjust_color_temperature
批量处理——实现“暖调”“冷调”“金色”风格的关键
风格预设应用
image_apply_preset
单张图片处理,核心风格载体
人脸检测
image_select_subject
搭配
bodyParts: ["Face"]
单张图片处理,仅在需要聚焦裁剪时使用
背景模糊
image_apply_gaussian_blur
单张图片处理,仅在用户明确要求时执行
裁剪
image_crop_and_resize
单张图片处理,可选操作
样本预览
asset_preview_file
仅对第一张图片展示前后对比
最终预览
asset_preview_file
批量资产数组预览
Firefly Board创建
create_firefly_board
包含所有编辑后的输出文件

Step 0 - prereq: 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-batch-edit-photos", "skill_version": "1.0.1" }

首先调用
adobe_mandatory_init
。该接口会返回文件处理规则和工具路由指引,是后续工作流程的必备前提。
json
{ "skill_name": "adobe-batch-edit-photos", "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创意工具”连接器已激活后,对照上述工具参考表格,检查该连接器提供的可用工具。

Step 2: Image Ingestion

步骤2:图片导入

Call
asset_add_file
with no parameters to open the file picker:
Tool: asset_add_file
Params: {}

调用不带参数的
asset_add_file
以打开文件选择器:
Tool: asset_add_file
Params: {}

Step 3: Understand the Desired Look

步骤3:理解用户期望的风格

Once URIs are obtained, scan the conversation to infer as many preferences as possible before asking anything:
  • Look: inferrable from words like "warm", "golden", "cinematic", "moody", "bright and airy", "muted", "film", "cool", "vibrant", "punchy"
  • Fine-tune tweaks: inferrable from "recover highlights", "lift shadows", "more contrast", "blown out", "too dark", "more vibrant", "desaturate"
  • Crop: inferrable from "no crop", "square", "1:1", "portrait crop", "keep framing", etc.
Three cases:
A — Everything clear from context: Skip
AskUserQuestion
entirely. Post the confirmation message, then proceed directly to Step 3b (sample preview). Do NOT start the full batch — the preview and confirm gate always runs regardless of how clearly preferences were stated.
B — Some things clear, some not: Confirm what you've inferred upfront, then call
AskUserQuestion
with only the questions that remain unanswered. For example, if the look and a tweak are clear but crop isn't, post:
📷 Got [N] photo(s)! Based on what you said, I'll go with:
- Look: Moody & Cinematic
- Tweaks: Recover blown highlights

Just one thing — do you want a crop?
Then call
AskUserQuestion
with Question 3 only.
C — Nothing specified: Post the full intro and show all 3 questions:
📷 Got [N] photo(s)! I'll apply consistent edits across all of them so
the set looks cohesive.

What kind of look are you going for? 👇
The full
AskUserQuestion
questions (use only the ones that are still open):
Question 1 (single_select):
  question: "🎨 Pick a base look"
  options:
    - "Auto (balanced, neutral)"
    - "Warm & Golden — cozy, travel, golden hour"
    - "Bright & Airy — clean, light, lifestyle"
    - "Moody & Cinematic — dramatic, contrasty, desaturated"
    - "Cool & Fresh — clear skies, travel, blue tones"
    - "Vibrant & Punchy — vivid, bold, social-ready"
    - "Muted & Film — faded, analog, editorial"

Question 2 (multi_select):
  question: "🎛️ Fine-tune (optional)"
  options:
    - "Recover blown highlights"
    - "Lift dark shadows"
    - "Boost contrast"
    - "Boost color intensity"
    - "Desaturate / muted tones"
    - "Adjust exposure (brighter/darker)"
    - "Tune bright areas"
    - "Blur background (heavy)"
    - "None"

Question 3 (single_select):
  question: "✂️ Crop ratio? (optional)"
  options:
    - "No crop — keep original framing"
    - "1:1 square"
    - "4:5 portrait"
    - "16:9 wide"
    - "4:3 standard"

Question 4 (single_select):  [only ask if Q3 is not "No crop"]
  question: "🎯 How should the crop be framed?"
  options:
    - "Center — crop from center of image"
    - "Smart crop — detect subject/face and frame around it"
Wait for the user's reply before proceeding.
Note on Question 4: If the user's message already implies a framing preference (e.g. "center crop", "crop to my face", "frame around the subject"), skip Q4 and infer directly. If the user specifies a ratio but not a framing method, default to Smart crop — it almost always produces a better result than a pure center cut.
获取图片URI后,先扫描对话内容,尽可能多推断用户偏好,再决定是否询问:
  • 风格:可从“暖调”“金色”“电影质感”“氛围感”“明亮通透”“低饱和”“胶片感”“冷调”“鲜艳”“冲击力”等词汇推断
  • 微调需求:可从“恢复高光”“提亮阴影”“增加对比度”“过曝”“太暗”“更鲜艳”“降低饱和度”等词汇推断
  • 裁剪需求:可从“不裁剪”“正方形”“1:1”“竖版裁剪”“保留原构图”等词汇推断
三种场景:
A — 上下文已明确所有需求: 完全跳过
AskUserQuestion
。发送确认消息,直接进入步骤3b(样本预览)。无论需求表述得多么清晰,预览和确认环节必须执行,不可直接启动全批量处理。
B — 部分需求明确,部分不明确: 先确认已推断出的内容,再调用
AskUserQuestion
仅询问未明确的问题。例如,如果风格和微调需求明确,但裁剪需求不明确,发送:
📷 已获取[N]张照片!根据你的描述,我将采用以下设置:
- 风格:氛围感电影风
- 微调:恢复过曝高光

只剩一个问题——你需要裁剪吗?
然后仅调用
AskUserQuestion
的问题3。
C — 无任何指定需求: 发送完整引导语并展示全部3个问题:
📷 已获取[N]张照片!我将对所有照片应用统一编辑,让整套风格保持一致。

你想要哪种风格?👇
完整的
AskUserQuestion
问题(仅使用未明确的问题):
问题1(单选):
  question: "🎨 选择基础风格"
  options:
    - "自动(均衡、中性)"
    - "暖调金色风 — 温馨、旅行、黄金时刻"
    - "明亮通透风 — 干净、明亮、生活化"
    - "氛围感电影风 — 戏剧性、高对比、低饱和"
    - "冷调清新风 — 晴空、旅行、蓝色调"
    - "鲜艳冲击风 — 生动、大胆、适合社交平台"
    - "低饱和胶片风 — 褪色、复古、编辑感"

问题2(多选):
  question: "🎛️ 微调选项(可选)"
  options:
    - "恢复过曝高光"
    - "提亮暗部阴影"
    - "增加对比度"
    - "提升色彩饱和度"
    - "降低饱和度 / 低饱和色调"
    - "调整曝光(调亮/调暗)"
    - "优化亮部区域"
    - "重度模糊背景"
    - "无"

问题3(单选):
  question: "✂️ 裁剪比例?(可选)"
  options:
    - "不裁剪 — 保留原构图"
    - "1:1 正方形"
    - "4:5 竖版"
    - "16:9 宽屏"
    - "4:3 标准"

问题4(单选):  [仅当问题3选择“不裁剪”以外选项时询问]
  question: "🎯 裁剪构图方式?"
  options:
    - "居中 — 从图片中心裁剪"
    - "智能裁剪 — 检测主体/人脸并围绕其构图"
等待用户回复后再继续。
关于问题4的说明: 如果用户的消息已暗示构图偏好(例如“居中裁剪”“裁剪到我的脸”“围绕主体构图”),则跳过问题4直接推断。如果用户指定了比例但未说明构图方式,默认使用智能裁剪——它几乎总能比纯居中裁剪产生更好的效果。

Look → Parameter Mapping

风格→参数映射

Base look →
image_adjust_color_temperature
+
image_apply_preset
+ adjustments:
LookColor Temp (a, b, luminance)PresetSaturation/VibranceBrightness/Contrast
Auto (balanced)none
Adaptive: Auto Tone
nonenone
Warm & Goldena=32, b=120, luminance=67
Adaptive: Subject - Warm Pop
vibrance +15none
Bright & Airya=20, b=60, luminance=62
Adaptive: Subject - Pop
saturation -10, vibrance +10brightness +15
Moody & Cinematica=20, b=-50, luminance=45
Adaptive: Sky - Dark Drama
saturation -20contrast +25
Cool & Fresha=18, b=-123, luminance=45
Adaptive: Sky - Blue Drama
vibrance +10none
Vibrant & Punchynone
Adaptive: Subject - Pop
vibrance +30, saturation +15contrast +10
Muted & Filmnonenonesaturation -35, vibrance -10contrast +10
Fine-tune → tool parameters:
  • "Recover blown highlights" →
    image_adjust_highlights
    amount: -60
  • "Lift dark shadows" →
    image_adjust_dark_portions
    amount: +40
  • "Boost contrast" →
    image_adjust_brightness_and_contrast
    contrast: 30
  • "Boost color intensity" →
    image_adjust_vibrance_and_saturation
    vibrance: 30
  • "Desaturate / muted tones" →
    image_adjust_vibrance_and_saturation
    saturation: -30
  • "Adjust exposure (brighter/darker)" →
    image_adjust_exposure
    exposure: +0.5
    (brighter) or
    exposure: -0.5
    (darker); infer direction from context, default to
    +0.3
    if unspecified
  • "Tune bright areas" →
    image_adjust_light_portions
    amount: +20
  • "Blur background (heavy)" →
    image_apply_gaussian_blur
    blurRadius: 12, blurTarget: "background"
  • "None" → skip fine-tune step entirely
Crop:
  • "No crop" → skip Step 7 entirely
  • Ratio + "Center" →
    image_crop_and_resize
    with
    fit: "reframe"
    , that ratio as
    output
    ,
    align: { x: 0.5, y: 0.5 }
    (pure center cut)
  • Ratio + "Smart crop" →
    image_crop_and_resize
    with
    fit: "reframe"
    , that ratio as
    output
    ,
    focus: "face"
    if portraits/people likely, else
    focus: "subject"
    (smart reframe around detected subject at the chosen ratio)
After receiving selections, confirm the settings back to the user:
✅ Got it — running with:
- Look: [selected look]
- Tweaks: [list if any, or "none"]
- Crop: [ratio or "no crop"] + [Center / Smart crop]
- Background blur: [yes/no]
Then proceed immediately to Step 3b (sample preview) — do not start the full batch yet.

基础风格 →
image_adjust_color_temperature
+
image_apply_preset
+ 调整项:
风格色温参数(a, b, 亮度)预设自然饱和度/饱和度调整亮度/对比度调整
自动(均衡)
Adaptive: Auto Tone
暖调金色风a=32, b=120, 亮度=67
Adaptive: Subject - Warm Pop
自然饱和度 +15
明亮通透风a=20, b=60, 亮度=62
Adaptive: Subject - Pop
饱和度 -10, 自然饱和度 +10亮度 +15
氛围感电影风a=20, b=-50, 亮度=45
Adaptive: Sky - Dark Drama
饱和度 -20对比度 +25
冷调清新风a=18, b=-123, 亮度=45
Adaptive: Sky - Blue Drama
自然饱和度 +10
鲜艳冲击风
Adaptive: Subject - Pop
自然饱和度 +30, 饱和度 +15对比度 +10
低饱和胶片风饱和度 -35, 自然饱和度 -10对比度 +10
微调选项→工具参数:
  • "恢复过曝高光" →
    image_adjust_highlights
    amount: -60
  • "提亮暗部阴影" →
    image_adjust_dark_portions
    amount: +40
  • "增加对比度" →
    image_adjust_brightness_and_contrast
    contrast: 30
  • "提升色彩饱和度" →
    image_adjust_vibrance_and_saturation
    vibrance: 30
  • "降低饱和度 / 低饱和色调" →
    image_adjust_vibrance_and_saturation
    saturation: -30
  • "调整曝光(调亮/调暗)" →
    image_adjust_exposure
    exposure: +0.5
    (调亮)或
    exposure: -0.5
    (调暗);从上下文推断方向,未指定时默认
    +0.3
  • "优化亮部区域" →
    image_adjust_light_portions
    amount: +20
  • "重度模糊背景" →
    image_apply_gaussian_blur
    blurRadius: 12, blurTarget: "background"
  • "无" → 完全跳过微调步骤
裁剪:
  • "不裁剪" → 完全跳过步骤7
  • 比例 + "居中" →
    image_crop_and_resize
    搭配
    fit: "reframe"
    ,指定比例为
    output
    align: { x: 0.5, y: 0.5 }
    (纯居中裁剪)
  • 比例 + "智能裁剪" →
    image_crop_and_resize
    搭配
    fit: "reframe"
    ,指定比例为
    output
    ,如果是人像/人物照片则
    focus: "face"
    ,否则
    focus: "subject"
    (围绕检测到的主体智能重构到指定比例)
收到用户选择后,向用户确认设置:
✅ 已确认——将使用以下设置:
- 风格:[所选风格]
- 微调:[列出所选选项,若无则显示“无”]
- 裁剪:[比例或“不裁剪”] + [居中 / 智能裁剪]
- 背景模糊:[是/否]
然后立即进入步骤3b(样本预览)——暂不启动全批量处理。

Step 3a: Large Batch Warning (N > 5)

步骤3a:大批次警告(N > 5)

Include this as part of the Step 3b confirmation prompt (after the before/after preview) when N > 5:
⏱ Estimated time for [N] images:
  6–10 → ~3–5 min
  11–20 → ~5–10 min
  20+ → 10+ min

Feel free to step away — I'll post a ✅ summary with download links when done.

当N > 5时,在步骤3b的确认提示中(前后对比预览之后)添加以下内容:
⏱ [N]张图片的预计处理时间:
  6–10张 → ~3–5分钟
  11–20张 → ~5–10分钟
  20张以上 → 10分钟以上

你可以先去处理其他事情——完成后我会发送✅总结和下载链接。

Step 3b: Sample Preview (Before/After on Image 1)

步骤3b:样本预览(第一张图片的前后对比)

Before running the full batch, process the first image only through the complete pipeline (Steps 4–8) using the confirmed settings. This gives the user a real preview of exactly what will be applied to every image.
  1. Run the full pipeline on
    sourceURIs[0]
    only (straighten → tone → look → fine-tune → blur → crop).
  2. Call
    asset_preview_file
    directly with both the original source URL and the processed output URL — do NOT resize either through
    image_crop_and_resize
    first, as that introduces white bars or unwanted cropping:
javascript
asset_preview_file({
  assets: [
    { name: "Before", presignedAssetUrl: sourceURIs[0] },
    { name: "After",  presignedAssetUrl: processed_url }
  ]
})
  1. Post this message (append the large-batch timing note here if N > 5):
👆 Here's a before/after preview using your first photo and the settings you selected.

How does it look?
  1. Call
    AskUserQuestion
    with a single question:
Question (single_select):
  question: "Ready to run the full batch?"
  options:
    - "✅ Looks great — run all [N] images"
    - "🎛️ Adjust settings"
    - "❌ Cancel"
If "Looks great": Start the full batch on the remaining images (
sourceURIs[1…]
). Reuse the already-processed image[0] result — do not reprocess it.
If "Adjust settings": Re-show the full
AskUserQuestion
set from Step 3. Once new settings are confirmed, ask whether the user wants another preview or wants to go straight to the full batch:
Question (single_select):
  question: "Want to preview the new settings first, or run all images now?"
  options:
    - "👁 Preview first"
    - "🚀 Run all [N] images now"
  • If "Preview first": repeat Step 3b with the new settings (process image[0] again, show before/after, offer the same Looks great / Adjust / Cancel gate).
  • If "Run all now": start the full batch immediately on all
    sourceURIs
    with the new settings. Do not reuse the earlier image[0] result — reprocess it with the updated settings. If "Cancel": Acknowledge and stop. Do not process any images.

在启动全批量处理前,仅使用已确认的设置对第一张图片执行完整流程(步骤4–8)。这能让用户直观预览将应用到所有图片的效果。
  1. 仅对
    sourceURIs[0]
    执行完整流程(扶正→调色→风格→微调→模糊→裁剪)。
  2. 直接调用
    asset_preview_file
    ,传入原始图片URL和处理后的输出URL——请勿先通过
    image_crop_and_resize
    调整大小,否则会导致白边或不必要的裁剪:
javascript
asset_preview_file({
  assets: [
    { name: "Before", presignedAssetUrl: sourceURIs[0] },
    { name: "After",  presignedAssetUrl: processed_url }
  ]
})
  1. 发送以下消息(如果N > 5,在此处添加大批次时间提示):
👆 这是使用你的第一张照片和所选设置生成的前后对比预览。

效果如何?
  1. 调用
    AskUserQuestion
    并提出一个问题:
Question (单选):
  question: "是否准备启动全批量处理?"
  options:
    - "✅ 效果很好——处理所有[N]张图片"
    - "🎛️ 调整设置"
    - "❌ 取消"
如果选择“效果很好”: 启动对剩余图片(
sourceURIs[1…]
)的全批量处理。复用已处理的第一张图片结果——无需重新处理。
如果选择“调整设置”: 重新展示步骤3中的完整
AskUserQuestion
问题集。确认新设置后,询问用户是要再次预览还是直接启动全批量处理:
Question (单选):
  question: "是先预览新设置效果,还是立即处理所有图片?"
  options:
    - "👁 先预览"
    - "🚀 立即处理所有[N]张图片"
  • 如果选择“先预览”:使用新设置重复步骤3b(再次处理第一张图片,展示前后对比,提供同样的“效果很好/调整/取消”选项)。
  • 如果选择“立即处理所有图片”:立即使用新设置对所有
    sourceURIs
    启动全批量处理。请勿复用之前的第一张图片结果——需使用更新后的设置重新处理。 如果选择“取消”: 确认并停止流程,不处理任何图片。

Step 4: Auto-Straighten (per image)

步骤4:自动扶正(单张图片处理)

Tool: image_auto_straighten
Params:
  imageURIs: ["<source_uri_N>"]
  options:
    uprightMode: "auto"
    constrainCrop: true
Output:
results[0].outputUrl
straightened_urls[]
On failure: use original URI, note "straighten skipped" for that image.

Tool: image_auto_straighten
Params:
  imageURIs: ["<source_uri_N>"]
  options:
    uprightMode: "auto"
    constrainCrop: true
输出:
results[0].outputUrl
straightened_urls[]
处理失败时:使用原始URI,并记录该图片“扶正步骤已跳过”。

Step 5: Auto-Tone (per image)

步骤5:自动调色(单张图片处理)

Tool: image_apply_auto_tone
Params:
  imageURI: "<straightened_url_N>"
  options:
    type: "cameraRawFilter"
  outputFileType: "jpeg"
Use
type: "cameraRawFilter"
for
image_apply_auto_tone
. Output:
results[0].outputUrl
toned_urls[]

Tool: image_apply_auto_tone
Params:
  imageURI: "<straightened_url_N>"
  options:
    type: "cameraRawFilter"
  outputFileType: "jpeg"
image_apply_auto_tone
需使用
type: "cameraRawFilter"
。输出:
results[0].outputUrl
toned_urls[]

Step 6: Apply the Look (per image)

步骤6:应用风格(单张图片处理)

Apply the look in this order per image, chaining outputs:
6a: Color Temperature (if the look requires it — see mapping table)
image_adjust_color_temperature
supports a batch
imageURIs
array. Pass all toned URLs at once for efficiency:
Tool: image_adjust_color_temperature
Params:
  imageURIs: ["<toned_url_1>", "<toned_url_2>", ...]
  options:
    a: <value from mapping>         # green-red axis (-128–127)
    b: <value from mapping>         # blue-yellow axis (-128–127)
    luminance: <value from mapping> # 0–100
Output:
results[N].outputUrl
color_temp_urls[]
6b: Look Preset (if the look uses one — see mapping table)
Tool: image_apply_preset
Params:
  imageURI: "<color_temp_url_N>"
  options:
    presetName: "<preset from mapping>"
6c: Vibrance / Saturation (if the look requires it)
Tool: image_adjust_vibrance_and_saturation
Params:
  imageURIs: ["<previous_url_N>"]
  options:
    vibrance: <value>
    saturation: <value>
6d: Brightness + Contrast (if the look requires either — combine into one call)
Tool: image_adjust_brightness_and_contrast
Params:
  imageURIs: ["<previous_url_N>"]
  options:
    brightness: <value>   # omit if not needed for this look
    contrast: <value>     # omit if not needed for this look
Combining brightness and contrast into a single call saves a round trip and produces the same result as two sequential calls.
The goal is consistency: apply the same parameter values to every image, even if some images might technically look better with different values. Cohesion beats perfection here.
On 403 (entitlement) for
image_apply_preset
:
Skip the preset for all images. Note in the delivery summary: "[Preset name] was skipped — not included in your Adobe plan." Continue with the rest of the look adjustments.

按以下顺序对每张图片应用风格,链式传递输出结果:
6a: 色温调整(如果风格需要——参考映射表)
image_adjust_color_temperature
支持批量
imageURIs
数组。为提高效率,一次性传入所有调色后的URL:
Tool: image_adjust_color_temperature
Params:
  imageURIs: ["<toned_url_1>", "<toned_url_2>", ...]
  options:
    a: <映射表中的值>         # 绿-红轴 (-128–127)
    b: <映射表中的值>         # 蓝-黄轴 (-128–127)
    luminance: <映射表中的值> # 0–100
输出:
results[N].outputUrl
color_temp_urls[]
6b: 风格预设应用(如果风格使用预设——参考映射表)
Tool: image_apply_preset
Params:
  imageURI: "<color_temp_url_N>"
  options:
    presetName: "<映射表中的预设>"
6c: 自然饱和度/饱和度调整(如果风格需要)
Tool: image_adjust_vibrance_and_saturation
Params:
  imageURIs: ["<previous_url_N>"]
  options:
    vibrance: <值>
    saturation: <值>
6d: 亮度+对比度调整(如果风格需要其中一项——合并为一次调用)
Tool: image_adjust_brightness_and_contrast
Params:
  imageURIs: ["<previous_url_N>"]
  options:
    brightness: <值>   # 如果该风格不需要则省略
    contrast: <值>     # 如果该风格不需要则省略
将亮度和对比度调整合并为一次调用可减少往返次数,且效果与两次连续调用相同。
目标是保持一致性:对所有图片应用相同的参数值,即使部分图片使用不同参数在技术上效果更好。风格统一优先于单张完美。
如果
image_apply_preset
返回403权限错误:
对所有图片跳过预设步骤。在交付总结中注明:“[预设名称]已跳过——你的Adobe套餐不包含此功能。”继续执行其他风格调整步骤。

Step 7: Fine-Tune Adjustments (batch, if selected)

步骤7:微调调整(批量处理,若用户选择)

Apply user-selected tweaks across all images at once. All of these tools accept a batch
imageURIs
array — chain from the look output:
Tool: image_adjust_highlights / image_adjust_dark_portions / image_adjust_brightness_and_contrast /
      image_adjust_vibrance_and_saturation / image_adjust_exposure / image_adjust_light_portions
Params:
  imageURIs: ["<look_url_1>", "<look_url_2>", ...]
  options:
    <values from mapping>
Run each selected tweak in sequence, chaining outputs. If "Boost contrast" is selected AND the look already calls
image_adjust_brightness_and_contrast
for brightness (e.g. Bright & Airy), merge them into a single call with both
brightness
and
contrast
values rather than running two separate calls.
Background blur (if selected, per image):
Tool: image_apply_gaussian_blur
Params:
  imageURIs: ["<url_N>"]
  options:
    blurRadius: 12
    blurTarget: "background"

将用户选择的微调选项批量应用到所有图片。所有这些工具都支持批量
imageURIs
数组——从风格处理的输出结果链式传递:
Tool: image_adjust_highlights / image_adjust_dark_portions / image_adjust_brightness_and_contrast /
      image_adjust_vibrance_and_saturation / image_adjust_exposure / image_adjust_light_portions
Params:
  imageURIs: ["<look_url_1>", "<look_url_2>", ...]
  options:
    <映射表中的值>
按顺序执行每个选中的微调选项,链式传递输出结果。如果用户选择了“增加对比度”且风格已调用
image_adjust_brightness_and_contrast
调整亮度(例如明亮通透风),则将两者合并为一次调用,同时传入
brightness
contrast
值,而非两次单独调用。
背景模糊(如果用户选择,单张图片处理):
Tool: image_apply_gaussian_blur
Params:
  imageURIs: ["<url_N>"]
  options:
    blurRadius: 12
    blurTarget: "background"

Step 8: Crop (per image, if requested)

步骤8:裁剪(单张图片处理,若用户要求)

If "No crop" was selected, skip this step entirely.
Both crop modes use the same
fit: "reframe"
at the chosen ratio — the difference is in how the frame is positioned within the image.
Center crop — cuts to the target ratio from the geometric center:
Tool: image_crop_and_resize
Params:
  imageURI: "<adjusted_url_N>"
  options:
    output: "<ratio>"        # "1:1", "4:5", "16:9", "4:3"
    fit: "reframe"
    align: { x: 0.5, y: 0.5 } # geometric center
  outputFileType: "jpeg"
Smart crop — same ratio, but positions the frame around the detected subject or face rather than the geometric center. The subject stays in frame even if they're off-center in the original:
Tool: image_crop_and_resize
Params:
  imageURI: "<adjusted_url_N>"
  options:
    output: "<ratio>"   # "1:1", "4:5", "16:9", "4:3"
    fit: "reframe"
    focus: "face"       # or "subject" for non-portrait scenes
  outputFileType: "jpeg"
Collect as
final_urls[]
. If no crop:
final_urls[]
= outputs from Step 7 (or Step 6 when no fine-tunes are selected).

如果用户选择“不裁剪”,则完全跳过此步骤。
两种裁剪模式均使用相同的
fit: "reframe"
和所选比例——区别在于图片内构图的定位方式。
居中裁剪——从几何中心裁剪到目标比例:
Tool: image_crop_and_resize
Params:
  imageURI: "<adjusted_url_N>"
  options:
    output: "<比例>"        # "1:1", "4:5", "16:9", "4:3"
    fit: "reframe"
    align: { x: 0.5, y: 0.5 } # 几何中心
  outputFileType: "jpeg"
智能裁剪——相同比例,但围绕检测到的主体或人脸定位构图,而非几何中心。即使主体在原始图片中偏离中心,也能保持在画面内:
Tool: image_crop_and_resize
Params:
  imageURI: "<adjusted_url_N>"
  options:
    output: "<比例>"   # "1:1", "4:5", "16:9", "4:3"
    fit: "reframe"
    focus: "face"       # 非人像场景使用"subject"
  outputFileType: "jpeg"
将结果收集到
final_urls[]
。如果不裁剪:
final_urls[]
= 步骤7的输出(或无微调选项时步骤6的输出)。

Step 9: Preview

步骤9:预览

Pass the final output URLs directly to
asset_preview_file
— do NOT run them through
image_crop_and_resize
first. Adding a resize step introduces white bars (from
fit: "pad"
) or crops subjects (from
fit: "reframe"
).
asset_preview_file
handles its own thumbnailing correctly.
javascript
asset_preview_file({
  assets: [
    { name: "photo_1.jpg", presignedAssetUrl: final_url_1 },
    // ... one per image
  ]
})
If
asset_preview_file
fails, present the final output URLs as plain text links in the completion summary.
Before/after preview (Step 3b): Same rule applies — pass the original source URL and the processed URL directly to
asset_preview_file
. Do not resize either.
直接将最终输出URL传入
asset_preview_file
——请勿先通过
image_crop_and_resize
处理。添加调整大小步骤会导致白边(使用
fit: "pad"
时)或裁剪主体(使用
fit: "reframe"
时)。
asset_preview_file
会正确处理缩略图生成。
javascript
asset_preview_file({
  assets: [
    { name: "photo_1.jpg", presignedAssetUrl: final_url_1 },
    // ... 每张图片对应一项
  ]
})
如果
asset_preview_file
处理失败,则在完成总结中以纯文本链接形式展示最终输出URL。
前后对比预览(步骤3b): 同样遵循此规则——直接将原始图片URL和处理后的URL传入
asset_preview_file
,请勿调整大小。

Create Firefly Board

创建Firefly Board

Call the firefly board tool with the final output urls as follows:
javascript
create_firefly_board({
  import_adobe_storage: [
    final_output_url_1,
    final_output_url_2,
    // ...
  ]
})
Board link handling:
  • create_firefly_board
    returns a board URL. Extract it and store as
    board_url
    .
  • If
    board_url
    is present and non-empty, include it in the completion message.
  • If the call throws an error or returns no URL: omit the board link and note "Firefly Board unavailable" in the summary (retrying does not help). Then post the completion message. The preview grid is included in every completion message. The board link is included whenever
    board_url
    was returned.
If N ≤ 3:
✅ Done! [N] photos edited with a consistent [look name] look.

📥 Download:
• Photo 1 → <final_url_1>
• ...

🎨 View in Firefly Board → <board_url>   ← always include if board_url is set

Look applied: [look name] → [brief description of what was applied]
If N > 3:
✅ Done! [N] photos edited with a consistent [look name] look.

📥 Your edited photos:
• Photo 1 → <final_url_1>
• Photo 2 → <final_url_2>
• ...

🎨 View in Firefly Board → <board_url>   ← always include if board_url is set

Look applied: [look name] → [brief description of what was applied]

使用最终输出URL调用Firefly Board工具,方式如下:
javascript
create_firefly_board({
  import_adobe_storage: [
    final_output_url_1,
    final_output_url_2,
    // ...
  ]
})
Board链接处理:
  • create_firefly_board
    会返回一个Board URL。提取并保存为
    board_url
  • 如果
    board_url
    存在且非空,则在完成消息中包含该链接。
  • 如果调用抛出错误或未返回URL:省略Board链接,并在总结中注明“Firefly Board不可用”(重试无效)。 然后发送完成消息。预览网格会包含在所有完成消息中。只要返回了
    board_url
    ,就会包含Board链接。
如果N ≤ 3:
✅ 处理完成!已为[N]张照片应用统一的[风格名称]风格。

📥 下载链接:
• 照片1 → <final_url_1>
• ...

🎨 在Firefly Board中查看 → <board_url>   ← 只要board_url存在就包含

应用的风格:[风格名称] → [应用内容的简要描述]
如果N > 3:
✅ 处理完成!已为[N]张照片应用统一的[风格名称]风格。

📥 编辑后的照片:
• 照片1 → <final_url_1>
• 照片2 → <final_url_2>
• ...

🎨 在Firefly Board中查看 → <board_url>   ← 只要board_url存在就包含

应用的风格:[风格名称] → [应用内容的简要描述]

Verbosity Rule

信息展示规则

Report only: major stage starts, per-image failures (logged once), and the final summary.
  • When a major stage starts (e.g. "Applying Warm & Golden look to [N] images…")
  • Any per-image failure (log once, continue)
  • Final summary with grid + download links

仅报告以下内容:主要阶段启动、单张图片处理失败(仅记录一次)、最终总结。
  • 主要阶段启动时(例如“正在为[N]张照片应用暖调金色风格…”)
  • 任何单张图片处理失败(记录一次,继续处理其他图片)
  • 包含预览网格和下载链接的最终总结

Output Extraction

输出提取

All pipeline tools return:
json
{ "results": [{ "success": true, "outputUrl": "https://..." }] }
Read
results[N].outputUrl
. On
success: false
→ see Error Handling.

所有流程工具返回的格式如下:
json
{ "results": [{ "success": true, "outputUrl": "https://..." }] }
读取
results[N].outputUrl
。如果
success: false
→ 参考错误处理规则。

Error Handling

错误处理

SituationAction
image_apply_preset
returns 403
Skip preset for all images (Pattern 1). Note in summary. Continue with other look steps.
Any tone/color tool returns 403Skip that step. Note in summary. Continue.
Any tool returns "No approval received"Treat the same as a 403 entitlement error. For optional steps (presets, fine-tune adjustments, preview), skip and note in summary. Retrying does not help for this error — continue per the rules above.
Any tool returns 401Ask user to re-authenticate via Adobe OAuth and retry.
Any tool returns "file too large or corrupted"Stop processing that image immediately. Do not retry, do not attempt alternative URLs. Tell the user: "I couldn't process [filename] — it's either too large or the file may be damaged. Try re-uploading a smaller version, or check that the file opens correctly on your end." Flag the image in the summary and continue with remaining images.
asset_add_file
shows no files
Remind user to select files in the picker.
image_auto_straighten
fails
Use original URI; note "straighten skipped".
image_apply_auto_tone
fails
Use straightened URI; note in summary.
Any adjustment tool failsUse previous step's output; note in summary.
image_apply_gaussian_blur
fails
Use previous output; note "blur skipped".
image_crop_and_resize
fails
Use blur/adjusted output as final; note in summary.
asset_preview_file
returns "No approval received"
Present final output URLs as plain text links in the summary instead.
All steps fail on one imageReturn original URI; flag clearly in summary.

场景处理方式
image_apply_preset
返回403错误
对所有图片跳过预设步骤(模式1)。在总结中注明。继续执行其他风格步骤。
任何调色/色彩工具返回403错误跳过该步骤。在总结中注明。继续执行。
任何工具返回“No approval received”视为与403权限错误相同。对于可选步骤(预设、微调调整、预览),跳过并在总结中注明。此错误重试无效——按上述规则继续处理。
任何工具返回401错误要求用户通过Adobe OAuth重新认证后重试。
任何工具返回“file too large or corrupted”立即停止处理该图片。不重试,不尝试其他URL。告知用户:“无法处理[文件名]——文件过大或已损坏。请尝试上传更小的版本,或检查文件在你的设备上能否正常打开。”在总结中标记该图片,继续处理剩余图片。
asset_add_file
未显示任何文件
提醒用户在选择器中选择文件。
image_auto_straighten
处理失败
使用原始URI;记录“扶正步骤已跳过”。
image_apply_auto_tone
处理失败
使用扶正后的URI;在总结中注明。
任何调整工具处理失败使用上一步的输出结果;在总结中注明。
image_apply_gaussian_blur
处理失败
使用上一步的输出结果;记录“模糊步骤已跳过”。
image_crop_and_resize
处理失败
使用模糊/调整后的输出结果作为最终结果;在总结中注明。
asset_preview_file
返回“No approval received”
在总结中以纯文本链接形式展示最终输出URL。
某张图片所有步骤均处理失败返回原始URI;在总结中明确标记。

Hard Constraints

硬性约束

  • Every image in the batch is processed; failures are flagged rather than silently skipped.
  • image_apply_auto_tone
    is called with
    type: "cameraRawFilter"
    .
  • Apply the same parameter values to every image in the batch (cohesion over perfection).
  • Adaptive presets are off by default — only run them as part of a look.
  • Background blur uses
    image_apply_gaussian_blur
    with
    blurTarget: "background"
    (
    image_apply_lens_blur
    is not used here).
  • Completion is posted as a clear in-chat message (no push notifications).
  • 批量中的每张图片都会被处理;失败会被标记,而非静默跳过。
  • image_apply_auto_tone
    必须使用
    type: "cameraRawFilter"
    调用。
  • 对批量中的所有图片应用相同的参数值(风格统一优先于单张完美)。
  • 自适应预设默认关闭——仅作为风格的一部分执行。
  • 背景模糊使用
    image_apply_gaussian_blur
    并设置
    blurTarget: "background"
    (不使用
    image_apply_lens_blur
    )。
  • 完成消息以清晰的聊天内消息形式发送(不推送通知)。