New:Socket for Asana Is Now Available.Learn more
Sign In

photo-s-tools

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

photo-s-tools

批量照片处理工具箱:压缩/转换/调色/EXIF/RAW/去重/选片/REST+MCP — Batch photo toolkit: compress, convert, grade, EXIF, RAW, dedup, cull (CLI + GUI + REST + MCP)

pipPyPI
Version
2.1.0
Weekly downloads
4.4K
Maintainers
1
Created

📷 PhotoS

Python Platform License PyPI

CLI for AI agents, GUI for humans. PhotoS is a cross-platform batch photo toolbox: a full Tkinter GUI — v2.0 workspace with Library / Develop (live pipeline preview + histogram + edit tools beside it) / Export (photo queue + output settings) / Tools modules — and a CLI / REST / MCP surface with one versioned JSON contract for AI agents.

🖥 GUI for humans · ⌨️ CLI for AI agents · pip install photo-s-tools

English · 中文

🤖 Built for AI agents

PhotoS is an AI-agent-ready image pipeline: four integration paths, one versioned JSON contract (schema_version, additive-only — upgrades never break a consumer).

PathEntry point
MCP server — 25 tools (process / select / hdr / blurfaces / dedup / …)claude mcp add photo-s -- photo-s mcp
Packaged SKILL.md — skill-capable agents, zero extrascp -r skills/photo-s ~/.claude/skills/
REST API — async tasks + SSE progressphoto-s serve --port 0 --token auto --ready-file x.json
Python library — no IPC overheadfrom photo_s.engine import batch_process

Every output carries schema_version; JSON keys are always English; per-file errors never abort the batch; destructive actions require an explicit flag. Full contract: docs/AGENT_API.md.

✨ Features

FeatureGUICLIDescription
Batch compressJPEG/WebP/HEIC/AVIF quality tuning, chroma subsampling (444/422/420)
Target size modeAuto-tune quality to fit under a target file size
Format convertJPEG / PNG / WebP / TIFF / BMP / HEIC / AVIF
RAW decode22+ camera RAW formats, built-in (rawpy/libraw); demosaic algorithm choice, color space (sRGB/AdobeRGB/ProPhotoRGB), 16-bit TIFF output, auto sRGB ICC tagging
Resize / ScaleMax dimensions, percentage, or longest-side cap
Visual previewLive original↔processed preview rendered through the real pipeline
Tone & colorBrightness/contrast/saturation/gamma/sharpen, B&W, sepia
Export sharpenLR-style output-stage USM, radius scales with output resolution
White balanceKelvin temperature or gray-card sampling
WB tint axisGreen(-)/magenta(+) G-M axis
Point curves / levelsPCHIP point curves, manual black/white/gamma
3-way color gradingShadows/midtones/highlights hue + sat zones
HSL split8 color domains, hue/sat/lum shifts
Point colorTargeted hue/sat/lum around a sampled color + range
Local masksNamed linear/radial/color-range masks + v1.8 AI segmentation (subject/person/object:class), brush strokes (subtract mode), combos (A&B / A-B); 11 scalar + 5 string local adjustments under each
Lens correctionManual distortion k1, vignette fix, CA fix (pure numpy); named user-maintained lens profiles
Perceptual analysisHistograms / channel stats / WB lean / exposure / blur (analyze)
Vibrance / clarity / textureNatural saturation, local contrast
Dehaze / vignette / grainDark-channel dehaze, radial vignette, film grain
ExposureStops adjustment or normalize-to-target auto exposure
Auto levels2% clip histogram stretch
Highlight recoveryLR-style: compress flat clipped highlights back to visible gradient
LOG recoverySLOG3/CLOG3/LOGC3/DLOG/VLOG/HLG (1D LUT, no deps)
LUT grading.cube trilinear (plugin adds tetrahedral + 5 film presets)
AI auto-tone✅¹Plugin: CLIP+MLP predicts 9-field LR params + confidence, RAG boost, optional Qwen3-VL aesthetic score & advisor (photo-s-plugin-auto-tone[model])
Denoise✅¹NLM ([enhance] extra)
Auto-straighten✅¹Level the horizon, confidence-gated ([enhance] extra)
HDR merge✅¹Exposure fusion, handheld alignment ([enhance] extra)
Face blur✅¹Blur or pixelate faces, Haar cascade ([enhance] extra)
CutoutBackground removal → alpha: AI segmentation (subject/person/object:class) or color key (color:R,G,B[tol,feather,invert] — white-bg text/logo); PNG/WebP/TIFF/AVIF/HEIC (JPEG errors per file)
Crop / Rotate / Flip / PadUnified aspect crop + arbitrary geometry
Print sizeCenter-crop + exact print pixels at a DPI
Smart renameDate/camera/sequence templates
Auto folder organizeDate/camera subfolder creation
WatermarkText + image overlay, 7 positions
Multi-size outputOne input set, N labeled outputs
Metadata taggingRating/keywords/caption batch tag (UserComment)
Metadata filterFind photos by rating/keywords
Metadata importBatch write from spreadsheet
CullingExposure/sharpness filter (GUI keeps only matches, undoable)
Select (keeper)Sort by rating — keep/reject thresholds (≥4 keep, ≤2 reject)
Burst keep-sharpestKeep the sharpest of a burst
Checksum manifestSHA-256 archive integrity + verify
HTML gallerySelf-contained index.html + thumbnails
PresetsSave/load named configs + built-in lr-look (LR-style grade: S-curve, vibrance, export sharpen)
Multi-profile batchOne input set, N output profiles
Parallel processingMulti-threaded
JSON outputMachine-readable output for AI agents
Config fileTOML defaults
EXIF editBatch copyright/author/GPS
Preset applyOne-click apply a saved style
EXIF date shiftTimezone/camera clock fixes
Privacy scrubStrip EXIF + ICC + GPS
Sync dateOutput mtime ← EXIF datetime
Folder watchAuto-process new files ([watch] extra)
Auto-rotateEXIF Orientation-based
Image dedupPerceptual hash duplicate detection
Quality metricsSSIM / blur score
CSV reportPer-file stats
Integrity checkCorrupt file scan
Contact sheetGrid montage
Color managementsRGB / CMYK flatten
REST APIHTTP server for agents (async tasks + SSE progress)
Plugin systemThird-party plugin support
Official plugin managerlist/install/info/fetch + pip install
MCP server25 tools to MCP clients (Claude Desktop / Claude Code / any MCP client)
Batch benchmarkWorker-scaling measurement

¹ Denoise / auto-straighten / HDR / face blur need an optional dependency: pip install photo-s-tools[enhance] (opencv-python-headless). When missing, these features give a clear install hint and the rest keeps working.

📦 Install

pip install photo-s-tools            # core — RAW decode (rawpy) built in
pip install "photo-s-tools[enhance]" # + opencv: face blur / HDR / denoise / straighten
pip install "photo-s-tools[tiff16]"  # + tifffile: 16-bit RAW → TIFF output
pip install "photo-s-tools[mcp]"     # + MCP server (Python 3.10+)

Zero-install (uvx): uvx --from photo-s-tools photo-s --help · uvx --from "photo-s-tools[mcp]" photo-s mcp

🚀 Quick start

photo-s batch 'RAW/*.ARW' --format jpeg -o out/ -q 90   # batch RAW → JPEG
photo-s batch 'RAW/*.ARW' -o out/ -q 95 --jpeg-subsampling 444 \
  --raw-demosaic amaze                                # max quality RAW → JPEG
photo-s batch 'RAW/*.ARW' -o out/ --preset lr-look     # LR-style grade out of the box
photo-s compress *.jpg --target-size 5MB -j 8           # auto-tune to ≤5MB
photo-s select ~/shoot/ -r --selects-dir picks --rejects-dir bin --dry-run
photo-s hash ~/deliver/ -o manifest.csv --verify manifest.csv

photo-s --help lists all 34 commands. Language: --language en|zh|auto.

🧭 Documentation

DocContents
docs/FEATURES.mdFull inventory — 34 CLI commands, engine pipeline
docs/AGENT_API.mdAgent contract: JSON shapes, exit codes, REST, MCP
docs/PLUGINS.mdPlugin system: SCUNet denoise, LUT, write your own
docs/GUI_CHANGES.mdGUI behavior & interface contract
docs/ROADMAP.mdVersion roadmap (v1.6.0: Lightroom-direction grading)

Names: PyPI distribution photo-s-tools (the obvious photo-s is taken) · CLI command photo-s · Python package photo_s · brand PhotoS.

⚠️ Limitations

PhotoS is a batch / delivery pipeline, not an interactive editor — no RAW-domain editing. Local editing is spec-driven: named masks (linear/radial/color/AI segmentation/brush strokes/combos) + local adjustments under masks, all as compact strings that serialize through CLI/REST/MCP/presets.

  • On-device inference, no cloud. Denoise model weights (SCUNet) download to your machine on first use; nothing is uploaded.
  • Licensing. Official code and most official model weights (incl. the SCUNet checkpoint) are MIT — free for commercial use. Exception: the auto-tone plugin's weights are CC-BY-NC 4.0 (non-commercial, trained on personal Lightroom edits; see plugins/auto-tone/LICENSE-WEIGHTS.txt). Third-party plugins and models carry their own licenses; verify before redistribution.

📄 License

MIT

Keywords

image

FAQs

Related posts