psd-compiler
Turns PSD and PSB files into images identical to Photoshop’s, with no Photoshop, no browser and no GPU.
cargo install --git https://github.com/ChoqueCastroLD/psd-compiler-cli
What it does
psdc reads PSD and PSB files, composites every layer and redraws text layers from their type data with the real fonts. So if you change a text (in the file, with --set-text or through the library), the final image shows it. It exports PNG, JPEG, WebP, TIFF or AVIF, and it can also save the edited PSD.
Why it exists
Almost every tool that "renders" a PSD actually shows the preview Photoshop saved in the file. If you translate a comic or fill a template, that preview is stale and the only way out was opening Photoshop. psd-compiler redraws the text, and we calibrated it against Photoshop until it matched.
What it replaces
Opening Photoshop just to export, or libraries that only read the saved preview (psd-tools, ag-psd) once the text changed.
Who it’s for
Developers of scanlation tools, servers that render images from templates and anyone who needs PSD to image in bulk.
Features
- 1
Photoshop-grade text
Kerning, tracking, leading, paragraph boxes, justification, caps, underline. IoU 0.97 against Photoshop on real comic pages.
- 2
Vertical and OpenType
Upright CJK, rotated Latin, ligatures, contextual alternates, fractions and more.
- 3
Every warp
All 15 Warp Text styles and custom meshes.
- 4
Every effect
Stroke, shadows, glows, satin, bevel and emboss, overlays.
- 5
Adjustment layers
Levels, curves, hue/saturation, color balance, gradient map and the rest.
- 6
Smart objects
With their cached pixels or re-rendered from the embedded file.
- 7
The whole format
PSD and PSB, 1 to 32-bit, RGB, CMYK, Lab, grayscale, indexed and more.
- 8
Fast
About 140 ms for a 1284×1826 page, and batches in parallel.
Technical info
- Written in Rust (1.85 or newer). One static binary, plus a safe library.
- Fonts are found by PostScript name in your folders and the system’s; no fonts ship with it.
- Compiles to WebAssembly: that’s how Capishot uses it in the browser.
- Tested against 732 reference files from eight projects (psd-tools, ag-psd, Krita, Aspose and more): 97.7% match.
- Install: cargo install --git https://github.com/ChoqueCastroLD/psd-compiler-cli
- Used by Capishot (PSD saving), Capistudio (typeset export) and CapiUploader (PSD to JPG).
Plans
Free
Open source under the MIT license. Use it for anything.
Versions and latest changes
Fonts from memory Latest
Loads fonts without files on disk and documents the WebAssembly build.
Lighter library
The CLI sits behind a feature, so library users skip its dependencies.
Closer to Photoshop
Bevel textures, color balance, CMYK channel mixer and tests against Aspose, Artal and oov/psd files.
Released
First public version on GitHub with the psdc CLI.