storytold/photocraft
PhotoCraft: An open-source photo editor written from scratch in pure Rust
What it solves
PhotoCraft is an open-source image editor that reimplements Adobe Photoshop from scratch, written entirely in Rust. It offers a free, offline, native alternative to subscription photo editing that can open, edit, and save real layered Photoshop (PSD) files. Because it is a clean-room implementation built only from public specifications and observed behaviour, there is no proprietary code, no cloud requirement, and no account needed.
How it works
PhotoCraft is built "engine first": a pure-data document model and a command engine sit at the core, with a thin user interface on top. Every menu item, tool, and dialog runs one of 500+ commands from a single registry. The same commands are callable from the graphical UI, a command-line interface, a JSON control channel, or an MCP server — so anything you can click, a script or an AI agent can also do, including headlessly.
Under the hood, two compositors render the canvas: a CPU compositor that serves as a reference oracle, and a GPU compositor built on wgpu (supporting Metal, Vulkan, DX12, and WebGPU). Copy-on-write tiles make undo cheap and large canvases light. The whole engine and UI compile to WebAssembly, so it can also run in a browser.
The PSD support is a standalone crate written from Adobe's public specification and tested against a corpus of real-world files. Opening and re-saving a document preserves the render for 307 of 309 files in the psd-tools test set, and anything not yet modelled is carried over rather than dropped.
Who it's for
PhotoCraft is for anyone doing image editing — designers, photographers, and digital artists — who wants a Photoshop-like experience without the subscription, the cloud, or proprietary software. It is also for developers and AI researchers: the CLI, JSON control channel, and MCP server make it possible to script edits or let an AI agent operate the tool headlessly, and the README's screenshots were all rendered offscreen through that control channel.
Highlights
- 70 tools covering selection, painting, retouching, vector drawing, type, and more
- 16 adjustment layers (Levels, Curves, Vibrance, Hue/Saturation, and more) that keep edits live and non-destructive
- Layer styles — Drop Shadow, Glow, Bevel & Emboss, Satin, Stroke, and overlays — live on any layer, including type
- Real PSD/PSB support with faithful round trips, plus many other formats: layered TIFF, Paint.NET PDN3, OpenRaster, GIMP XCF, Krita .kra, SVG, PNG, JPEG, WebP, GIF, BMP, TGA, ICO, QOI, PNM, OpenEXR, Radiance HDR, FITS, and read-only HEIC and Affinity documents
- Smart objects with editable, reorderable smart filters and lossless transforms and warps
- A real brush engine driven by pen pressure, tilt, rotation, and direction, with deterministic, replayable strokes
- RGB, Grayscale, CMYK, and Lab documents at 8, 16, and 32 bits per channel, with real ICC colour management in pure Rust
- Runs on macOS, Windows, Linux, FreeBSD, and in the browser via WebAssembly
- Agent-ready: 500+ commands callable from the UI, CLI, JSON control channel, or MCP server
- Clean-room implementation from public specs only — no proprietary code, shaders, or assets
- More than 1,700 tests, including PSD round trips, synthetic generators, compositor oracles, and multi-depth checks
Related
- Project
- Project
- Project
- Project
- Project