Community画像github.com

photo-render

Local CPU-only deterministic non-destructive renderer: apply EXISTING edits from matching *.xmp sidecars (exposure, white balance, contrast, highlights, shadows, whites, blacks, saturation/vibrance, tone curve, crop/rotate/ straighten, process-version aware) to source RAW (Sony .ARW) or supported images and write finished sRGB images (JPEG 92 / TIFF / PNG, full resolution or --max-long-edge). Third stage of photo-cull -> photo-develop -> photo-render. Prefers photo-develop XMP at <source-or-output>/photo-ai/xmp. Originals read-only; source XMP never overwritten; no style learning; no retouching; no network. Batch-capable; reuses photo-develop raw.py + cull_input and optional LightCraft CLI backend when present; honest applied/unsupported field reporting; no Adobe Lightroom/Capture One/Aftershoot pixel parity.

photo-render とは?

photo-render is a OpenCode agent skill that local CPU-only deterministic non-destructive renderer: apply EXISTING edits from matching *.xmp sidecars (exposure, white balance, contrast, highlights, shadows, whites, blacks, saturation/vibrance, tone curve, crop/rotate/ straighten, process-version aware) to source RAW (Sony .ARW) or supported images and write finished sRGB images (JPEG 92 / TIFF / PNG, full resolution or --max-long-edge). Third stage of photo-cull -> photo-develop -> photo-render. Prefers photo-develop XMP at <source-or-output>/photo-ai/xmp. Originals read-only; source XMP never overwritten; no style learning; no retouching; no network. Batch-capable; reuses photo-develop raw.py + cull_input and optional LightCraft CLI backend when present; honest applied/unsupported field reporting; no Adobe Lightroom/Capture One/Aftershoot pixel parity.

対応~Claude Code~Codex CLI~Cursor✓OpenCode
npx skills add https://github.com/jpb18/FototecaSkills/tree/HEAD/photo-render

Installed? Explore more 画像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

photo-render — finished images from existing non-destructive edits

Minimal pipeline: photo-cull → photo-develop → photo-render. This skill is the last stage. It does not invent edits, does not learn/apply styles (that's photo-style-edit, not implemented here), does not retouch, does not touch source files, and does not use the network. CPU-only.

It reads source RAW (e.g. Sony .ARW, also DNG/CR2/CR3/NEF/RAF/ORF/… via rawpy/LibRaw) or supported images (JPEG/PNG/TIFF/BMP/GIF/WEBP) plus a matching non-destructive *.xmp, applies ONLY already-present edits, and writes finished images. photo-render itself creates no style profiles.

Run

python "$env:USERPROFILE\.config\opencode\skills\photo-render\scripts\run_pipeline.py" `
  --source "C:\path\to\session" `
  --output "C:\path\to\session\photo-render" `
  --cull   "C:\path\to\session\pre-cull-report" `      # photo-cull scores.json (or photo-develop photo-ai)
  --xmp    "C:\path\to\session\photo-ai\xmp" `          # photo-develop XMPs; optional
  --sample 2

Windows/PowerShell paths with backslashes and spaces are supported; quote paths. Reuse photo-cull + photo-develop first if you want keepers + suggested edits:

# 1) photo-cull -> pre-cull-report/scores.json
# 2) photo-develop -> photo-ai/xmp/*.xmp  (+ previews, report)
# 3) photo-render (this skill)
python ...\photo-render\scripts\run_pipeline.py `
  --source "C:\path\to\session" --cull "C:\path\to\session\pre-cull-report" `
  --xmp "C:\path\to\session\photo-ai\xmp" --output "C:\path\to\session\photo-render"

Options

  • --source DIR (required, read-only) · --output DIR (default <source>/photo-render)
  • --cull DIR|FILE reuse photo-cull scores.json (or photo-develop enriched photo-ai/scores.json): renders keepers (is_keeper==true, stable input order); matching source preferred as RAW (stem match) else the listed image
  • --xmp FILE|DIR explicit sidecar or folder of *.xmp; <stem>.xmp matched
  • --sample N render first N keepers/images — sample mode is NOT a full-pipeline success claim (status:"sample", full_pipeline_claim:false)
  • --format jpeg|tiff|png (default jpeg) · --jpeg-quality 1..100 (default 92)
  • --color-space sRGB (only sRGB; default sRGB, static sRGB ICC embedded)
  • --max-long-edge N downscale long edge; full resolution by default; never upscale
  • --recursive scan --source recursively (bounded; prunes node_modules/.git/ dist/build/.next/target/vendor/.venv/pycache/output dirs; no symlinks; depth + file caps)
  • --keep-pairs render BOTH halves of RAW+JPEG same-stem pairs (default renders once per stem preferring RAW)
  • --emit-xmp copy applied source XMP verbatim to <output>/rendered-xmp/ (only when passed; never overwrites source XMP/source images)
  • --require-xmp render only sources with a matching XMP sidecar; the rest are recorded as skipped in summary.json (counts skipped separately from error, and a skip does not change the exit code). photo-export turns this on whenever a develop stage ran, so frames the develop stage deliberately left without a sidecar are never exported with default settings.
  • --renderer auto|builtin|lightcraft (default auto: LightCraft CLI if present, else builtin) · --lightcraft-cli PATH (or LIGHTCRAFT_CLI env)

XMP discovery (per image, in order; never writes source XMP)

  1. --xmp FILE, or <stem>.xmp inside --xmp DIR
  2. photo-develop output preferred: <source>/photo-ai/xmp/<stem>.xmp, <output>/photo-ai/xmp/<stem>.xmp (case-insensitive)
  3. adjacent sidecar next to source (<stem>.xmp, <name>.xmp, <name>.xmp variants, case-insensitive)
  4. none → render source unchanged (reported, not silently)

What is applied (and what is NOT)

applied_fields per image + aggregate lists every XMP field read & applied; unsupported_fields lists every other rendering field present — nothing is silently ignored. Known metadata (e.g. crs:AlreadyApplied, crs:HasSettings, xmp:Rating, xmp:Label, XMP history) is echoed as known_non_rendering_fields. Apply-existing-only; crs:AlreadyApplied is read & reported; sources are assumed un-rendered originals.

Applied (builtin): crs:Exposure2012/crs:Exposure, crs:WhiteBalance, crs:Temperature, crs:Tint, crs:Contrast2012/crs:Contrast, crs:Highlights2012, crs:Shadows2012/crs:Shadows, crs:Whites2012, crs:Blacks2012, crs:Saturation, crs:Vibrance, crs:ToneCurveName2012, crs:ToneCurvePV2012 + …Red/Green/Blue, legacy crs:ToneCurve + …Red/Green/Blue, crs:HasCrop, crs:CropTop/Left/Bottom/Right, crs:CropAngle, crs:Orientation, tiff:Orientation, crs:ProcessVersion (PV2012 11.0+ uses *2012 fields; older versions use legacy names). Crop/rotate/straighten applied; orientation applied; downscale after geometry.

Process-version awareness: read crs:ProcessVersion; PV2012 vs legacy field naming handled; nothing else assumed about profile versions.

Not applied (honestly reported unsupported when present): crs:CameraProfile (Adobe/camera profile not reproduced), crs:CropConstrainToWarp, HSL mixer, split toning, color grading, crs:Clarity2012/crs:Texture/crs:Sharpness/ crs:LuminanceSmoothing/crs:ColorNoiseReduction (in builtin mode; see LightCraft note), lens/optics/vignette corrections, grain, dehaze, local adjustments/masks, retouching, spot removal, snapshots/history, any unknown field. Adobe built-in named curves (e.g. ToneCurveName2012="Medium Contrast") WITHOUT explicit points are not synthesized.

LightCraft backend (--renderer lightcraft, auto when found): reuse lightcraft-cli render (sibling photo-develop uses the same backend); GPU disabled (LIGHTCRAFT_GPU=0, LIGHTCRAFT_NO_PREFS=1); sRGB; --size/--quality; applies its own supported superset. Additionally applies (forwarded in XMP, reported applied only in this mode; still NOT Adobe parity): crs:Clarity2012, crs:Texture, crs:Sharpness, crs:LuminanceSmoothing, crs:ColorNoiseReduction. Falls back to builtin (recorded in per-image notes) if LightCraft fails; renderer field says what was used. If LightCraft is absent, --renderer lightcraft gives a clear error; auto uses builtin.

Renderer backend

  • builtin (always available; fully deterministic; no external deps beyond the reused local rawpy/Pillow/numpy stack): RAW decoded with photo-develop pipeline.raw.decode_image (reused; rawpy/LibRaw, camera WB, sRGB, no-auto-bright, full res); supported images via Pillow + EXIF orientation. Applies the documented subset above. Smallest honest renderer subset; approximations (white balance blackbody, contrast pivot, tone-region smoothstep curves, chroma scaling, straightening fill, crop geometry) are documented; NOT Adobe-exact.
  • lightcraft: external proprietary CLI; LightCraft renders a lossless full-res sRGB intermediate which photo-render re-encodes deterministically (own format/quality/max-long-edge, static sRGB ICC, no metadata/timestamps); NOT Adobe.
  • No Adobe Lightroom / Capture One / Aftershoot pixel-parity claim. Validate in your editor before batch adoption.

Outputs (under --output; originals untouched)

  • <output>/rendered/ finished images, sRGB, batch; default JPEG q92 / TIFF-LZW / PNG; static sRGB ICC; deterministic encoder; no timestamps/metadata; full res unless --max-long-edge
  • <output>/logs/<stem>.json per-image log: applied_fields, unsupported_fields, known_non_rendering_fields, source, xmp, output, renderer, status, error, edits, notes, emitted_xmp?
  • <output>/summary.json totals, status, claim, sample_mode, full_pipeline_claim, renderer, applied_fields, unsupported_fields, unsupported_field_counts, counts, images[], honesty note
  • <output>/report.html standalone report (thumbnails, applied/unsupported, errors)
  • <output>/rendered-xmp/ verbatim XMP copies — only when --emit-xmp

Reuse (not reimplemented)

photo-develop scripts/pipeline/raw.py (decode_image, …), cull_input.py (select_photos keepers), config.py conventions (JPEG_EXT, RAW_EXT, photo-ai, xmp, CPU env, LIGHTCRAFT_*), XMP namespace conventions + crs: schema it writes; sibling photo-cull schema (scores.json keepers, file, is_keeper, category); optional LightCraft CLI (--lightcraft-cli; auto-discovered at C:\Program Files\LightCraft\lightcraft-cli.exe, C:\Program Files (x86)\LightCraft\..., PATH, LIGHTCRAFT_CLI). photo-develop xmp.py does not exist in this install; pipeline/xmp_apply.py implements reading (it writes nothing to source). photo-develop style-profile / learned adjustments are deliberately NOT read. photo-cull photo-ai / pre-cull-report consumed read-only.

Determinism, safety, limits

  • Deterministic: stable ordering, sorted JSON keys, fixed encoder, static sRGB ICC, no timestamps, no randomness, no network, CPU-only (GPU disabled).
  • Non-destructive: source RAW/JPEG/PNG/TIFF bytes and source *.xmp are only read; outputs only under --output; rendered-xmp copies are new files; nothing is deleted; no --force; never writes adjacent to sources.
  • Bounded scans; clear errors; per-image errors don't abort the batch (exit 0 all-ok / 2 any-error / 1 fatal). Unsupported fields reported.
  • Remaining limits: no Adobe pixel parity; white balance is a documented approximation (As-Shot/0/0 from photo-develop is a no-op; custom numeric WB approximate); tone-region & contrast curves approximate; crop geometry approximate (straightening fills exposed corners; Adobe crop units not fully replicated); named curves without points not synthesized; crs:CameraProfile/profile corrections/lens corrections/local adjustments/masks/noise+sharpen (builtin) not applied; LightCraft-only extras apply only in LightCraft mode; AlreadyApplied semantics noted not re-derived (pristine source assumed); EXIF-only edits not applied; builtin color management is sRGB in→sRGB out (no ICC transformation of embedded source profiles); LightCraft pixel output is re-encoded by photo-render (observed byte-deterministic here, but that depends on the installed backend); RAW decode determinism depends on the installed rawpy/LibRaw version. No style learning. No retouching. No network.

Tests

python "$env:USERPROFILE\.config\opencode\skills\photo-render\scripts\tests\test_smoke.py"
# or: python -m unittest discover -s "$env:USERPROFILE\.config\opencode\skills\photo-render\scripts\tests" -v

Stdlib unittest, no network, no LightCraft required (builtin path), synthetic images + XMPs; covers XMP parsing, process versions, curves, applied/unsupported honesty, discovery precedence, formats, crop, exposure, saturation, sample mode, keeper reuse, no-source-mutation, emit-xmp safety, clear errors.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

photo-compose

Local CPU-only non-destructive intelligent composition step for the photo pipeline (photo-cull -> photo-compose -> photo-develop -> photo-export). Analyses each photo-cull keeper for horizon/level (accidental tilt), verticals/perspective, saliency, focal elements, face gaze and movement space, then proposes and ranks rotation + smart-crop candidates and writes Camera Raw geometry XMP (straighten + crop + orientation) plus an interactive accept/reject/adjust report. Deterministic geometry in code; semantic/aesthetic judgment supplied by a multimodal agent via semantic.json. Use when the user asks to straighten horizons, level or fix tilt, crop or re-crop smartly, improve composition/framing, apply rule-of-thirds / golden ratio / negative space / gaze space, rotate photos, fix perspective or vertical lines, choose an aspect ratio, or to run/repair the composition step of a photo batch. Originals are read-only; nothing is written into the source except by photo-export's own Export folder.

photo-cull

Pipeline local de pré-culling fotográfico: analisa uma pasta de fotos (JPG/ARW) e detecta, automaticamente, fotos com desfoco, motion blur, sobre/subexposição, banding de LED e olhos fechados, classificando cada uma em MANTER / REVISAR / REJEITAR / INDETERMINADO; agrupa fotos duplicadas/quase-duplicadas e escolhe a melhor de cada grupo; produz um relatório HTML centrado em grupos. Usa esta skill sempre que o usuário quiser filtrar, "pre-cull", analisar qualidade, remover duplicados ou limpar um lote de fotos — por exemplo "remove fotos desfocadas", "encontrar fotos sobreexpostas", "reporte de qualidade de fotos", "culling de fotos de um evento", "limpa esta pasta de fotos ruins", "encontrar fotos com olhos fechados", "remover duplicadas" — mesmo que não diga a palavra "culling" explicitamente.

photo-develop

Local CPU-only Sony ARW develop, image review, Lightroom/Camera Raw XMP with a per-frame tone curve, previews and session report. Reuses photo-cull scores.json without repeating pre-cull.

photo-export

Local CPU-only deterministic NON-DESTRUCTIVE photo export. Chains sibling skills photo-cull -> photo-develop -> photo-render (their exact documented CLIs; no reimplementation; no invented flags), then COPIES finished sRGB rendered images into <source>/Export. Source/session folder read-only; originals never modified; no source/XMP writes; no adjacent sidecar writes; no network; no GPU; no style learning (not photo-style-edit); no retouching; applies ONLY already-present XMP via photo-render; unsupported XMP fields reported, never silently dropped; no Adobe Lightroom/Capture One/Aftershoot pixel parity; sample mode is NOT a full-pipeline claim. All intermediates go to a work dir (default <parent>.photo-export-work; never inside Export); nothing else is written into <parent>. Clear per-stage errors; missing tool / source / malformed input / no-keepers fail loudly. Optional reuse (--reuse-cull/--cull/--xmp/--no-cull/--no-develop/--no-render, <work> pre-cull + photo-ai/xmp + .state.json...

関連スキル