mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
Smart filters PhotoCraft applied with Pinch, Polar Coordinates, Ripple,
Spherize, Twirl, Wave, ZigZag or Invert were dropped when saving a PSD ("this
filter has no PSD equivalent"), and the same filters in a Photoshop file opened
as kept-verbatim entries that didn't render. They are now mapped both ways in
`smart_map.rs`, with the keys, enum codes and key order Photoshop 27 writes
(checked against a Photoshop-saved file holding one smart object per filter):
- Pinch `Pnch` Amnt; Twirl `Twrl` Angl; Ripple `Rple` Amnt + RplS (Sml/Mdm/Lrg);
Spherize `Sphr` Amnt + SphM (Nrml/HrzO/VrtO); Polar Coordinates `Plr ` Cnvr
(RctP/PlrR); ZigZag `ZgZg` Amnt, NmbR, ZZTy (PndR/OtFr/ArnC);
- Wave `Wave` Wvtp, NmbG, WLMn/WLMx, AmMn/AmMx, SclH/SclV, UndA, RndS.
PhotoCraft's Wave has no Scale, so a Photoshop wave scaled off 100% stays
verbatim rather than lose it;
- Invert `Invr`: no `Fltr`, `hasoptions` true, like Photoshop.
Shear stays unmapped for now: Photoshop stores its curve on its own grid.
Tests: the Photoshop `Fltr` bytes read back as the PhotoCraft settings and are
rewritten with the same keys, values and order; a scaled Wave round-trips
unchanged; Invert's item; the new filters join modelled_filters_round_trip.
The verbatim-filter tests now use Crystallize and Shear.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>