faceless-photolib

Migrating: Photoshop (.psd)

PSD import scope via ag-psd, the best-effort/source-preservation policy, and the generated blend-mode fidelity table.

Generated from code

The import-psd package has landed. The blend-mode fidelity table below is generated at build time from @faceless-photolib/import-pipeline's real mapping table (task 5.1) — a mapping change updates this page on the next site rebuild, with no manual doc edit.

Policy

PSD import follows the same shared policy documented in full on the OpenRaster guide: best-effort raster-safe subset, a data (not prose) fidelity report, source preservation of the original .psd as a role: "master" blob, and content-based (magic-byte) detection rather than filename sniffing.

Scope

Per design D7, PSD import reads via ag-psd (chosen specifically because it runs without a canvas dependency — this format's decoders are DOM-free by design, see Worker API):

  • Raster layers — composited layer image data, groups, opacity, and masks map onto the native layer model directly (mapped).
  • Blend modes map through a dedicated PSD→native table (below) — since packages/blend's 27-mode vocabulary already targets Photoshop compositing semantics, this mapping is "mostly identity," not a lossy reinterpretation.
  • Adjustment layers, smart objects, and text are the PSD features this importer does not attempt to reproduce faithfully — each degrades or drops per-layer, with the specific feature named in the fidelity report (never a blanket "PSD partially supported" without saying what).

Blend-mode mapping (generated from import-pipeline)

@faceless-photolib/import-pipeline's mapPsdBlendMode implements this table, keyed on the exact lowercase, space-separated strings ag-psd uses. It is rendered from that exact code at build time:

PSD blend modeNative modeVerdict
normalnormalmapped
dissolvedissolvemapped
darkendarkenmapped
multiplymultiplymapped
color burncolorBurnmapped
linear burnlinearBurnmapped
darker colordarkerColormapped
lightenlightenmapped
screenscreenmapped
color dodgecolorDodgemapped
linear dodgelinearDodgemapped
lighter colorlighterColormapped
overlayoverlaymapped
soft lightsoftLightmapped
hard lighthardLightmapped
vivid lightvividLightmapped
linear lightlinearLightmapped
pin lightpinLightmapped
hard mixhardMixmapped
differencedifferencemapped
exclusionexclusionmapped
subtractsubtractmapped
dividedividemapped
huehuemapped
saturationsaturationmapped
colorcolormapped
luminosityluminositymapped
pass through, linear height, height, subtractionnormaldegraded

pass through is a group isolation setting ("don't isolate — blend children with the layers below the group"), not a per-layer color-blend function, so it has no honest home in a per-layer blend-mode field; linear height, height, and subtraction are newer Photoshop modes with no equivalent in the native 27-mode set. All four degrade to normal rather than guessing a nearest match.

Corpus samples

Every PSD fixture in the sample corpus — the bit-depth/color-mode/group/mask/ blend-mode matrix, plus the hand-authored degradation cases — is served through the same /api/samples/<id> proxy every other demo on this site uses; no direct storage URL ever appears in this page. "Open in editor" runs the real import pipeline end to end, fidelity dialog included.

Samples — import-psd
Run checks in Test Lab

Preparing sample list…

Next

OpenRaster · Krita · Flat images