Asc Screenshot Resize

作者 rorkai9c7e769f09a1无许可证1K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库3天前更新

Resize and validate App Store screenshots with current asc screenshot-size data and macOS sips. Use when preparing or fixing screenshots for App Store Connect submission.

仅含说明Design & Creative
AI 生成的概览

通过查询可接受尺寸、去除透明通道、用 sips 调整尺寸并在上传前校验,来准备 App Store Connect 截图。

功能
该技能指导智能体为 App Store Connect 提交准备截图。它从 asc 命令行工具获取当前可接受的尺寸,清理文件名,使用 macOS sips 检查图像尺寸与元数据,去除 alpha 透明通道,将图像调整到选定目标尺寸,并在可选上传前用 asc 校验结果。它会在单独的输出目录中生成经过调整和校验的截图文件,同时保留原始文件。
适用场景
适用于为 App Store Connect 提交准备或修复截图时,尤其是图像尺寸不正确、带有 alpha 透明通道或文件名导致工具报错的情况。也适合在上传前批量调整并校验 iPhone 或 iPad 截图集。
运行要求
需要 asc 命令行工具及其截图尺寸、校验和上传子命令,以及 macOS sips 和用于清理文件名的 python3。上传时需要 App Store Connect 版本本地化标识符,asc 操作需要网络访问。该技能不附带脚本,全部为说明与 shell 命令。

asc screenshot resize

Use this skill to prepare screenshots for App Store Connect. Do not rely on a hard-coded dimension table in this skill; the CLI owns the current size matrix.

Source of truth

Always discover current accepted sizes from asc first:

bash
asc screenshots sizes --output tableasc screenshots sizes --all --output table

For local validation before upload:

bash
asc screenshots validate --path "./screenshots/iphone" --device-type "IPHONE_65" --output tableasc screenshots validate --path "./screenshots/ipad" --device-type "IPAD_PRO_3GEN_129" --output table

Common current device-type anchors:

  • IPHONE_65 for the common 6.5-inch iPhone screenshot set.
  • IPAD_PRO_3GEN_129 for the common 12.9/13-inch iPad screenshot set.

Run asc screenshots sizes --all when targeting other display types such as 6.9-inch iPhone, Apple TV, Mac, Vision Pro, iMessage, or Watch.

Workflow

1. Sanitize filenames

macOS screenshots can contain hidden Unicode spaces that make tools fail with "not a valid file". Sanitize before batch work:

bash
python3 -c "import osfor f in os.listdir('.'):    clean = f.replace('\u202f', ' ')    if f != clean:        os.rename(f, clean)        print(f'Renamed: {clean}')"

2. Inspect dimensions and metadata

bash
sips -g pixelWidth -g pixelHeight screenshot.pngsips -g hasAlpha -g space screenshot.png

App Store Connect rejects screenshots with alpha transparency. Strip alpha by round-tripping through JPEG:

bash
sips -s format jpeg input.png --out /tmp/asc-screenshot-no-alpha.jpgsips -s format png /tmp/asc-screenshot-no-alpha.jpg --out output.pngrm /tmp/asc-screenshot-no-alpha.jpg

Batch-strip alpha from PNGs:

bash
for f in *.png; do  if sips -g hasAlpha "$f" | grep -q "yes"; then    sips -s format jpeg "$f" --out /tmp/asc-screenshot-no-alpha.jpg    sips -s format png /tmp/asc-screenshot-no-alpha.jpg --out "$f"    rm /tmp/asc-screenshot-no-alpha.jpg    echo "Stripped alpha: $f"  fidone

3. Resize only after choosing a target from asc

Pick a width and height from asc screenshots sizes --all. sips -z takes height first, then width:

bash
# Example: portrait IPHONE_65 1284 x 2778sips -z 2778 1284 input.png --out output.png

Batch resize to a chosen target:

bash
mkdir -p resizedfor f in *.png; do  sips -z 2778 1284 "$f" --out "resized/$f"done

4. Validate outputs with asc

bash
sips -g pixelWidth -g pixelHeight -g hasAlpha resized/*.pngasc screenshots validate --path "./resized" --device-type "IPHONE_65" --output table

5. Upload only after validation

bash
asc screenshots upload --version-localization "LOC_ID" --path "./resized" --device-type "IPHONE_65" --dry-run --output tableasc screenshots upload --version-localization "LOC_ID" --path "./resized" --device-type "IPHONE_65"

Guardrails

  • Treat asc screenshots sizes --all as authoritative; Apple size requirements change.
  • Do not stretch screenshots across incompatible aspect ratios unless the user accepts the visual tradeoff.
  • Always output to a separate file or directory to preserve originals.
  • Screenshots must be PNG or JPEG and must not include alpha transparency.
  • Convert Display P3 or other color spaces to sRGB when needed:
bash
sips -m "/System/Library/ColorSync/Profiles/sRGB IEC61966-2.1.icc" input.png --out output.png
  • Prefer asc screenshots validate over visual inspection before upload.

来源与署名

来源:rorkai/app-store-connect-cli-skills位于skills/asc-screenshot-resize提交9c7e769

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架