Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Merge PR #7202: fix(atn): import a recorded Save As with its destination (#7102)

David Mannc436f61d5381
diff --cc crates/engine/src/atn_cmds.rs
index 3932f3380,726aa93bf..c73df8aef
--- a/crates/engine/src/atn_cmds.rs
+++ b/crates/engine/src/atn_cmds.rs
@@@ -3666,10 -3103,9 +3723,10 @@@ const EVENTS: &[Event] = &
Event { code: "Plc ", name: "placeEvent", label: "Place", ids: &["file.placeEmbedded", "file.placeLinked"], from: place_from, to: place_to },
Event { code: "Opn ", name: "open", label: "Open", ids: &["file.openAs"], from: open_from, to: open_to },
Event { code: "", name: "conditional", label: "If", ids: &["actions.conditional"], from: conditional_from, to: conditional_to },
- ev!("save", "save", "Save", "file.save", &[]),
+ Event { code: "save", name: "save", label: "Save", ids: &["file.save", "file.saveAs", "file.saveACopy"], from: save_from, to: save_to },
ev!("Rvrt", "revert", "Revert", "file.revert", &[]),
Event { code: "Ply ", name: "play", label: "Play", ids: &["actions.play"], from: play_from, to: play_to },
+ Event { code: "", name: "applyComp", label: "Apply Layer Comp", ids: &["layerComp.apply"], from: apply_comp_from, to: apply_comp_to },
Event { code: "Stop", name: "stop", label: "Stop", ids: &[STOP_MESSAGE], from: stop_from, to: stop_to },
];
diff --cc crates/engine/src/atn_cmds/tests.rs
index c633ab471,a9a9076d4..887bf9baa
--- a/crates/engine/src/atn_cmds/tests.rs
+++ b/crates/engine/src/atn_cmds/tests.rs
@@@ -552,21 -335,12 +552,23 @@@ fn every_mapped_command_exports_and_imp
("file.placeEmbedded", json!({"path": "/tmp/logo.png", "scale": 50})),
("file.placeLinked", json!({"path": "/tmp/logo.png"})),
("file.openAs", json!({"path": "/tmp/a.psd"})),
+ ("file.saveAs", json!({"path": "/tmp/out/a.png"})),
+ ("file.saveACopy", json!({"path": "/tmp/out/a.tif"})),
("actions.conditional", json!({"if": "hasLayers", "then": "FS8-Layers", "else": "FS8-No-Layers", "set": "S"})),
("actions.conditional", json!({"if": "landscape", "then": "Wide", "else": null, "set": "S"})),
+ ("tools.setColors", json!({"foreground": "#102030"})),
+ ("tools.setColors", json!({"background": "#ffffff"})),
+ ("view.fitOnScreen", json!({})),
+ ("view.zoomIn", json!({})),
+ ("layer.createClippingMask", json!({})),
+ ("layer.ungroupLayers", json!({})),
+ ("layer.layerStyle.copyLayerStyle", json!({})),
+ ("layer.layerStyle.pasteLayerStyle", json!({})),
+ ("layer.setExpanded", json!({"all": true, "expanded": false})),
+ ("layerComp.apply", json!({"comp": "Original"})),
("actions.play", json!({"action": "Other", "set": "S"})),
(STOP_MESSAGE, json!({"message": "Hi", "allowContinue": false})),
+ ("document.activate", json!({"offset": -1})),
// The TrueGrit Texture Supply sets (Debaser, Distress Press, Halftone Zine Machine).
("filter.distort.ripple", json!({"amount": 50, "size": "medium"})),
("filter.pixelate.crystallize", json!({"cellSize": 5})),
@@@ -2380,372 -1404,97 +2382,467 @@@ fn function_keys_keep_shift_and_command
assert_eq!(super::function_key_name(7, false, false), "F7");
}
+/// A param a PhotoCraft step leaves out exports as PhotoCraft's default wherever Photoshop plays
+/// the missing key differently (checked against Photoshop): Canvas Size anchors top left,
+/// Apply Image blends Normal, Color Balance turns preserve luminosity off, and a Paint Bucket
+/// step without a tolerance doesn't play at all.
+#[test]
+fn defaults_photoshop_plays_differently_are_written() {
+ let exported = |id: &str, p: Value| export_item(id, &p, "S").and_then(|i| i.descriptor).unwrap_or_else(|| panic!("{id} does not export"));
+ let bucket = exported("paint.bucket", json!({"x": 1, "y": 2}));
+ assert_eq!((get_num(&bucket, "Tlrn"), get_bool(&bucket, "AntA")), (Some(32.0), Some(true)));
+ let canvas = exported("image.canvasSize", json!({"width": 10, "height": 10}));
+ assert_eq!((get_enum(&canvas, "Hrzn").as_deref(), get_enum(&canvas, "Vrtc").as_deref()), (Some("Cntr"), Some("Cntr")));
+ let apply = exported("image.applyImage", json!({}));
+ assert_eq!(get_obj(&apply, "With").and_then(|w| get_enum(w, "Clcl")).as_deref(), Some("Mltp"));
+ let balance = exported("image.adjustments.colorBalance", json!({"midtones": [10, 0, 0]}));
+ assert_eq!(get_bool(&balance, "PrsL"), Some(true));
+ assert_eq!(get_list(&balance, "ShdL").map(<[D]>::len), Some(3));
+}
+
+/// Photoshop sets one colour per step: a step that sets both doesn't export rather than drop one.
+#[test]
+fn set_colors_exports_only_a_single_colour() {
+ assert!(export_item("tools.setColors", &json!({"foreground": "#ff0000", "background": "#0000ff"}), "S").is_none());
+ assert!(export_item("tools.setColors", &json!({"foregroundCmyk": [0, 0, 0, 100], "background": "#0000ff"}), "S").is_none());
+ assert!(export_item("tools.setColors", &json!({"background": "#0000ff"}), "S").is_some());
+}
+
+/// Photoshop's reset of an adjustment layer (`set` with an empty `T`) stays a reset: `kind`
+/// only joins params that edit something, as any key makes `layer.setAdjustment` merge.
+#[test]
+fn adjustment_layer_reset_still_resets() {
+ let set = |t: Descriptor| desc("null").with("null", target_ref("AdjL")).with("T ", D::Descriptor(t));
+ let reset = set(desc("HStr").with("presetKind", enm("presetKindType", "presetKindDefault")));
+ let edit = set(desc("ClrB").with("MdtL", D::List(vec![long(10.0), long(0.0), long(0.0)])));
+ let file = AtnFile {
+ name: UnicodeString::new_nul("Reset"),
+ expanded: false,
+ actions: vec![AtnAction {
+ name: UnicodeString::new_nul("A"),
+ items: vec![item("setd", "Set", Some(reset)), item("setd", "Set", Some(edit))],
+ ..Default::default()
+ }],
+ warnings: vec![],
+ };
+ let steps = import(&atn::write(&file).unwrap()).unwrap().actions.remove(0).steps;
+ assert_eq!(steps[0], ("layer.setAdjustment".to_string(), json!({})));
+ assert_eq!(steps[1].1, json!({"midtones": [10, 0, 0], "kind": "colorBalance"}));
+}
+
+/// A Free Transform recorded against an unlinked mask or an alpha channel must not export as a
+/// layer transform that moves the layer's pixels on replay (#7195).
+#[test]
+fn transform_with_mask_or_channel_target_is_not_exported_as_layer_transform() {
+ for target in [json!("mask"), json!({"channel": 0}), json!("quickMask")] {
+ let a = Action {
+ name: "Probe".into(),
+ steps: vec![("edit.transform".into(), json!({"target": target, "dx": 3, "dy": 2, "scaleX": 100, "interpolation": "nearest"}))],
+ ..Default::default()
+ };
+ assert!(export("Targets", &[&a], &[], false).is_err(), "{target} exported");
+ let (_, skipped) = export("Targets", &[&a], &[], true).unwrap();
+ assert_eq!(skipped, vec![Skipped { action: "Probe".into(), step: 0, id: "edit.transform".into() }]);
+ }
+ for params in [
+ json!({"dx": 3, "dy": 2, "scaleX": 50, "interpolation": "nearest"}),
+ json!({"target": "pixels", "dx": 3, "dy": 2, "scaleX": 50, "interpolation": "nearest"}),
+ ] {
+ let plain = Action { name: "Plain".into(), steps: vec![("edit.transform".into(), params)], ..Default::default() };
+ let (bytes, skipped) = export("Targets", &[&plain], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let imported = import(&bytes).unwrap();
+ assert_eq!(imported.actions[0].steps, vec![("edit.transform".to_string(), json!({"dx": 3, "dy": 2, "scaleX": 50, "interpolation": "nearest"}))]);
+ }
+ for form in [json!({"quad": [[0, 0], [1, 0], [1, 1], [0, 1]]}), json!({"matrix": [1, 0, 0, 1, 0, 0]}), json!({"rect": [0, 0, 1, 1]})] {
+ assert!(transform_to("edit.transform", &form).is_none());
+ }
+}
+
+/// Apply Image's optional blending mask has no `.atn` mapping: a strict export must refuse the
+/// step rather than drop the mask and widen the edit to the whole layer.
+#[test]
+fn apply_image_with_blending_mask_is_not_exported_without_its_mask() {
+ let source = json!({"layer": "Pixels", "channel": "green", "invert": true});
+ for params in [json!({"source": source, "blending": "normal", "mask": {"channel": 0}}), json!({"source": source, "blending": "normal", "maskChannel": 0})] {
+ let masked = Action { name: "Masked".into(), steps: vec![("image.applyImage".into(), params.clone())], ..Default::default() };
+ assert!(export("Audit5", &[&masked], &[], false).is_err(), "{params}");
+ let (_, skipped) = export("Audit5", &[&masked], &[], true).unwrap();
+ assert_eq!(skipped, vec![Skipped { action: "Masked".into(), step: 0, id: "image.applyImage".into() }]);
+ }
+ for params in [json!({"source": source, "blending": "normal"}), json!({"source": source, "blending": "normal", "mask": {"channel": "none"}})] {
+ let plain = Action { name: "Plain".into(), steps: vec![("image.applyImage".into(), params.clone())], ..Default::default() };
+ let (bytes, skipped) = export("Audit5", &[&plain], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let imported = import(&bytes).unwrap();
+ assert_eq!(imported.actions[0].steps, vec![("image.applyImage".to_string(), json!({"source": source, "blending": "normal"}))]);
+ }
+}
+
+fn image_size_round_trip(params: &Value) -> Option<Value> {
+ let item = export_item("image.imageSize", params, "S")?;
+ let e = event_for(&item.event).unwrap();
+ match (e.from)(item.descriptor.as_ref().unwrap()) {
+ Mapped::Steps(steps) => Some(steps[0].1.clone()),
+ _ => panic!("image size descriptor did not import as steps"),
+ }
+}
+
+/// A step with brush strokes and Sample All Layers is refused by `refineSelectionEdge`; it must
+/// not fall through to `smartBrushWorkspace`, which has no field for the strokes either.
+#[test]
+fn refine_edge_with_strokes_and_sample_all_layers_is_not_exported_without_the_strokes() {
+ let stroke = json!({"points": [[5, 4]], "size": 4, "mode": "add"});
+ let brushed = Action {
+ name: "Probe".into(),
+ steps: vec![("select.refineEdge".into(), json!({"radius": 1, "sampleAllLayers": true, "refineStrokes": [stroke]}))],
+ ..Default::default()
+ };
+ assert!(export("Audit", &[&brushed], &[], false).is_err());
+ let (_, skipped) = export("Audit", &[&brushed], &[], true).unwrap();
+ assert_eq!(skipped, vec![Skipped { action: "Probe".into(), step: 0, id: "select.refineEdge".into() }]);
+ let plain = Action {
+ name: "Plain".into(),
+ steps: vec![("select.refineEdge".into(), json!({"radius": 1, "sampleAllLayers": true, "refineStrokes": []}))],
+ ..Default::default()
+ };
+ assert!(export("Audit", &[&plain], &[], false).is_ok());
+}
+
+/// Photoshop's Select and Mask descriptor as mapped has no field for the Refine Edge Brush,
+/// so a step with brush strokes must not export as a plain Select and Mask without them.
+#[test]
+fn refine_edge_with_brush_strokes_is_not_exported_without_them() {
+ for mode in ["add", "subtract"] {
+ let brushed = Action {
+ name: "Probe".into(),
+ steps: vec![("select.refineEdge".into(), json!({"radius": 1, "refineStrokes": [{"points": [[5, 4]], "size": 4, "mode": mode}]}))],
+ ..Default::default()
+ };
+ assert!(export("Audit", &[&brushed], &[], false).is_err(), "{mode}");
+ let (_, skipped) = export("Audit", &[&brushed], &[], true).unwrap();
+ assert_eq!(skipped, vec![Skipped { action: "Probe".into(), step: 0, id: "select.refineEdge".into() }]);
+ }
+ for params in [json!({"radius": 1}), json!({"radius": 1, "refineStrokes": []}), json!({"radius": 1, "refineStrokes": null})] {
+ let plain = Action { name: "Plain".into(), steps: vec![("select.refineEdge".into(), params)], ..Default::default() };
+ let (bytes, skipped) = export("Audit", &[&plain], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let imported = import(&bytes).unwrap();
+ assert_eq!(imported.actions[0].steps, vec![("select.refineEdge".to_string(), json!({"radius": 1}))]);
+ }
+}
+
+#[test]
+fn image_size_resolution_only_does_not_gain_keep_print_size() {
+ // The .atn cannot tell resolution-only from keepPrintSize:true, so the former must not
+ // export as a descriptor that imports back as keep-print-size.
+ let params = json!({"resolution": 144, "resample": "nearest"});
+ assert_eq!(image_size_round_trip(&params), None);
+}
+
+#[test]
+fn image_size_intentional_controls_still_round_trip() {
+ for params in [
+ json!({"resolution": 144.0, "resample": "nearest", "keepPrintSize": true}),
+ json!({"width": 12.0, "height": 10.0, "resolution": 144.0, "resample": "nearest"}),
+ ] {
+ assert_eq!(image_size_round_trip(&params), Some(params.clone()));
+ }
+}
+
+#[test]
+fn recorded_layer_select_exports_to_atn() {
+ let mut s = Session::new();
+ s.execute("file.new", json!({"width": 8, "height": 8})).unwrap();
+ let l = s.execute("layer.new.layer", json!({"name": "Wanted"})).unwrap();
+ let wanted_id = l["layer"].as_u64().unwrap();
+ s.execute("actions.record", json!({"name": "SelectWanted"})).unwrap();
+ s.execute("layer.select", json!({"layer": wanted_id})).unwrap();
+ s.execute("actions.stop", json!({})).unwrap();
+
+ let action = s.execute("actions.get", json!({"action": "SelectWanted"})).unwrap();
+ assert_eq!(action["steps"][0], json!(["layer.select", {"name": "Wanted"}]));
+
+ // Strict export should succeed and produce bytes without skipUnsupported
+ let saved = s.execute("actions.save", json!({"action": "SelectWanted"})).unwrap();
+ assert_eq!(saved["steps"], 1);
+ assert_eq!(saved["skipped"], json!([]));
+
+ // When exported with skipUnsupported: true, it shouldn't skip the step either
+ let saved_skip = s.execute("actions.save", json!({"action": "SelectWanted", "skipUnsupported": true})).unwrap();
+ assert_eq!(saved_skip["steps"], 1);
+ assert_eq!(saved_skip["skipped"], json!([]));
+
+ // If an action has an occurrence target (duplicate names), it cannot be represented unambiguously in .atn
+ let bad_action = Action::new("Dup", vec![("layer.select".into(), json!({"name": "Wanted", "occurrence": 1}))]);
+ let err = export("Set", &[&bad_action], &[], false);
+ assert!(err.is_err(), "occurrence without representation must fail strict export");
+}
+
+#[test]
+fn select_rect_mode_strict_export_rejects_unrepresentable_modes() {
+ let mut s = Session::new();
+ s.execute("file.new", json!({"width": 8, "height": 8})).unwrap();
+
+ // Default or "replace" mode succeeds
+ s.actions.list.push(Action::new("ReplaceAct", vec![("select.rect".into(), json!({"x": 4, "y": 4, "width": 2, "height": 2, "mode": "replace"}))]));
+ let saved = s.execute("actions.save", json!({"action": "ReplaceAct"})).unwrap();
+ assert_eq!(saved["steps"], 1);
+
+ // "add" mode cannot be silently converted to replace (set) in strict export
+ s.actions.list.push(Action::new("AddAct", vec![("select.rect".into(), json!({"x": 4, "y": 4, "width": 2, "height": 2, "mode": "add"}))]));
+ let before_actions = s.actions.list.clone();
+ let err = s.execute("actions.save", json!({"action": "AddAct"}));
+ assert!(err.is_err(), "strict export must reject select.rect with add mode rather than converting to replace");
+ assert_eq!(s.actions.list, before_actions, "actions list must remain unchanged after rejected save");
+
+ // "subtract" mode cannot be silently converted to replace either
+ s.actions.list.push(Action::new("SubtractAct", vec![("select.rect".into(), json!({"x": 4, "y": 4, "width": 2, "height": 2, "mode": "subtract"}))]));
+ let before_actions_sub = s.actions.list.clone();
+ let err_subtract = s.execute("actions.save", json!({"action": "SubtractAct"}));
+ assert!(err_subtract.is_err(), "strict export must reject select.rect with subtract mode rather than converting to replace");
+ assert_eq!(s.actions.list, before_actions_sub, "actions list must remain unchanged after rejected save");
+
+ // With skipUnsupported: true, unrepresentable modes are reported in skipped
+ let skipped = s.execute("actions.save", json!({"action": "AddAct", "skipUnsupported": true})).unwrap();
+ assert_eq!(skipped["steps"], 0);
+ assert_eq!(skipped["skipped"][0]["id"], "select.rect");
+}
+
+#[test]
+fn radial_blur_off_center_strict_export_refuses_silent_recentering() {
+ let mut s = Session::new();
+ s.execute("file.new", json!({"width": 16, "height": 16})).unwrap();
+
+ // Default center (omitted) exports successfully
+ s.actions.list.push(Action::new("DefaultCenter", vec![("filter.blur.radialBlur".into(), json!({"amount": 50, "method": "spin", "quality": "good"}))]));
+ let saved = s.execute("actions.save", json!({"action": "DefaultCenter"})).unwrap();
+ assert_eq!(saved["steps"], 1);
+
+ // Explicit (0.5, 0.5) center also exports successfully
+ s.actions.list.push(Action::new(
+ "ExplicitDefaultCenter",
+ vec![("filter.blur.radialBlur".into(), json!({"amount": 50, "method": "spin", "quality": "good", "centerX": 0.5, "centerY": 0.5}))],
+ ));
+ let saved_exp = s.execute("actions.save", json!({"action": "ExplicitDefaultCenter"})).unwrap();
+ assert_eq!(saved_exp["steps"], 1);
+
+ // Off-center radial blur cannot be silently recentered in strict export
+ s.actions.list.push(Action::new(
+ "OffCenter",
+ vec![("filter.blur.radialBlur".into(), json!({"amount": 50, "method": "spin", "quality": "good", "centerX": 0.1, "centerY": 0.2}))],
+ ));
+ let before_actions = s.actions.list.clone();
+ let err = s.execute("actions.save", json!({"action": "OffCenter"}));
+ assert!(err.is_err(), "strict export must reject off-center radial blur rather than silently recentering it");
+ assert_eq!(s.actions.list, before_actions, "actions list must remain unchanged after rejected save");
+
+ // With skipUnsupported: true, off-center radial blur is skipped
+ let skipped = s.execute("actions.save", json!({"action": "OffCenter", "skipUnsupported": true})).unwrap();
+ assert_eq!(skipped["steps"], 0);
+ assert_eq!(skipped["skipped"][0]["id"], "filter.blur.radialBlur");
+
+ // Radial blur targeting a mask must not export as a plain filter that edits pixels
+ s.actions
+ .list
+ .push(Action::new("MaskTarget", vec![("filter.blur.radialBlur".into(), json!({"amount": 50, "method": "spin", "quality": "good", "target": "mask"}))]));
+ let before_actions = s.actions.list.clone();
+ let err_mask = s.execute("actions.save", json!({"action": "MaskTarget"}));
+ assert!(err_mask.is_err(), "strict export must reject radial blur with non-pixel target");
+ assert_eq!(s.actions.list, before_actions, "actions list must remain unchanged after rejected save");
+
+ let skipped_mask = s.execute("actions.save", json!({"action": "MaskTarget", "skipUnsupported": true})).unwrap();
+ assert_eq!(skipped_mask["steps"], 0);
+ assert_eq!(skipped_mask["skipped"][0]["id"], "filter.blur.radialBlur");
+
+ // Explicit pixels target exports successfully
+ s.actions.list.push(Action::new(
+ "PixelsTarget",
+ vec![("filter.blur.radialBlur".into(), json!({"amount": 50, "method": "spin", "quality": "good", "target": "pixels"}))],
+ ));
+ let saved_pixels = s.execute("actions.save", json!({"action": "PixelsTarget"})).unwrap();
+ assert_eq!(saved_pixels["steps"], 1);
+}
+
+/// A crop with W x H x Resolution output options must not export as a plain rectangle crop
+/// that keeps the old size and resolution on replay: the mapper has no field for them.
+#[test]
+fn crop_with_output_size_or_resolution_is_not_exported_as_plain_crop() {
+ for params in [
+ json!({"x": 1, "y": 1, "width": 4, "height": 3, "targetWidth": 8, "targetHeight": 6, "resolution": 144, "resample": "nearest"}),
+ json!({"x": 1, "y": 1, "width": 4, "height": 3, "resolution": 144}),
+ json!({"x": 1, "y": 1, "width": 4, "height": 3, "targetWidth": 8, "targetHeight": 6}),
+ ] {
+ let sized = Action { name: "Probe".into(), steps: vec![("image.crop".into(), params)], ..Default::default() };
+ assert!(export("Audit", &[&sized], &[], false).is_err());
+ let (_, skipped) = export("Audit", &[&sized], &[], true).unwrap();
+ assert_eq!(skipped, vec![Skipped { action: "Probe".into(), step: 0, id: "image.crop".into() }]);
+ }
+ let plain = Action { name: "Plain".into(), steps: vec![("image.crop".into(), json!({"x": 1, "y": 1, "width": 4, "height": 3}))], ..Default::default() };
+ let (bytes, skipped) = export("Audit", &[&plain], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let imported = import(&bytes).unwrap();
+ assert_eq!(imported.actions[0].steps, vec![("image.crop".to_string(), json!({"x": 1, "y": 1, "width": 4, "height": 3}))]);
+}
+
+/// `image.imageSize` with `resample: "none"` ignores width, height and percent; the `.atn`
+/// round trip must not turn them into a pixel resize (#7189).
+#[test]
+fn image_size_resample_none_keeps_ignoring_its_size_through_atn_export() {
+ let event = event_for(&export_item("image.imageSize", &json!({"resolution": 72}), "S").expect("exports").event).expect("a known event");
+ let back = |p: Value| {
+ let item = export_item("image.imageSize", &p, "S")?;
+ let Mapped::Steps(steps) = (event.from)(item.descriptor.as_ref().unwrap()) else { panic!("does not import back") };
+ let mut back = steps[0].1.clone();
+ normalise(&mut back);
+ Some(back)
+ };
+ for sized in [json!({"width": 12, "height": 10}), json!({"width": 12}), json!({"percent": 200}), json!({"width": 12, "percent": 50, "height": 3})] {
+ let mut p = sized.clone();
+ p["resolution"] = json!(144);
+ p["resample"] = json!("none");
+ assert_eq!(back(p.clone()), Some(json!({"resolution": 144, "resample": "none"})), "{p}");
+ }
+ // A step with nothing left to record is refused rather than exported as an empty (unsupported) event.
+ assert_eq!(back(json!({"width": 12, "height": 10, "resample": "none"})), None);
+ // Real resizes are untouched.
+ assert_eq!(back(json!({"width": 12, "height": 10, "resample": "bicubic"})), Some(json!({"width": 12, "height": 10, "resample": "bicubic"})));
+}
+
+/// #8302, #8308: Hue/Saturation's hue is `H ` in Photoshop's `Hst2`, both ways. It was written
+/// and read as `Hue `: exported actions failed in Photoshop, and Photoshop-recorded ones lost
+/// their hue on import with no warning. PhotoCraft's own older files (`Hue `) still read.
+#[test]
+fn hue_saturation_uses_photoshops_hue_key() {
+ let params = json!({"colorize": false, "hue": 30, "saturation": 20, "lightness": -7, "greens": {"hue": -12, "saturation": 0, "lightness": 0, "range": [75, 105, 135, 165]}});
+ let a = Action::new("H", vec![("image.adjustments.hueSaturation".into(), params.clone())]);
+ let (bytes, skipped) = export("S", &[&a], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let file = atn::parse(&bytes).unwrap();
+ let d = file.actions[0].items[0].descriptor.clone().expect("a descriptor");
+ let entries: Vec<Descriptor> =
+ get_list(&d, "Adjs").expect("Adjs").iter().filter_map(|e| if let D::Descriptor(e) = e { Some(e.clone()) } else { None }).collect();
+ assert_eq!(entries.len(), 2);
+ assert_eq!(get_num(&entries[0], "H "), Some(30.0), "the master hue under H");
+ assert_eq!(get_num(&entries[1], "H "), Some(-12.0), "a range's hue under H");
+ assert!(entries.iter().all(|e| get_num(e, "Hue ").is_none()), "no Hue key");
+
+ // A Photoshop-recorded step (H) and an older PhotoCraft one (Hue ) both import with the hue.
+ let step = |key: &str| {
+ desc("null")
+ .with("presetKind", enm("presetKindType", "presetKindCustom"))
+ .with("Clrz", D::Boolean(false))
+ .with("Adjs", D::List(vec![D::Descriptor(desc("Hst2").with(key, long(30.0)).with("Strt", long(20.0)).with("Lght", long(-7.0)))]))
+ };
+ for key in ["H ", "Hue "] {
+ let e = event_for(&item("HStr", "", None).event).expect("HStr imports");
+ match (e.from)(&step(key)) {
+ Mapped::Steps(steps) => {
+ assert_eq!(steps[0].0, "image.adjustments.hueSaturation");
+ assert_eq!(steps[0].1["hue"], json!(30.0), "{key:?}: {}", steps[0].1);
+ assert_eq!(steps[0].1["saturation"], json!(20.0));
+ }
+ Mapped::Unsupported { .. } => panic!("{key:?} is unsupported"),
+ }
+ }
+ // Through a whole file, saved and loaded back: the hue survives.
+ let back = import(&bytes).unwrap();
+ let mut p = back.actions[0].steps[0].1.clone();
+ normalise(&mut p);
+ assert_eq!(p["hue"], json!(30), "{p}");
+}
++
+ fn one_action(items: Vec<AtnItem>) -> AtnFile {
+ AtnFile {
+ name: UnicodeString::new_nul("Saves"),
+ expanded: false,
+ actions: vec![AtnAction { name: UnicodeString::new_nul("A"), items, ..Default::default() }],
+ warnings: vec![],
+ }
+ }
+
+ fn save_as(format: &str, path: &str) -> Descriptor {
+ desc("null").with("As ", D::Descriptor(desc(format))).with("In ", path_value(path)).with("DocI", long(53.0))
+ }
+
+ #[test]
+ fn save_as_to_a_file_imports_with_its_destination() {
+ let file = one_action(vec![
+ item("save", "Save", Some(save_as("PNGF", "/out/result.png"))),
+ item("save", "Save", Some(save_as("Google WebPShop", "C:\\out\\result.webp").with("Cpy ", D::Boolean(true)))),
+ item("save", "Save", Some(save_as("JPEG", "/out/result.jpeg"))),
+ item("save", "Save", Some(save_as("WebPFormat", "/out/result.webp"))),
+ item("save", "Save", None),
+ item("save", "Save", Some(desc("null").with("DocI", long(53.0)))),
+ ]);
+ let imp = import(&atn::write(&file).unwrap()).unwrap();
+ assert_eq!(
+ imp.actions[0].steps,
+ [
+ ("file.saveAs".to_string(), json!({"path": "/out/result.png"})),
+ ("file.saveACopy".to_string(), json!({"path": "C:\\out\\result.webp"})),
+ ("file.saveAs".to_string(), json!({"path": "/out/result.jpeg"})),
+ ("file.saveAs".to_string(), json!({"path": "/out/result.webp"})),
+ ("file.save".to_string(), json!({})),
+ ("file.save".to_string(), json!({})),
+ ]
+ );
+ assert!(imp.unsupported.is_empty());
+ }
+
+ #[test]
+ fn save_as_that_cannot_be_mapped_stops_playback_instead_of_saving_over_the_file() {
+ // Before #7102 each of these imported as a plain File › Save, which overwrote the file the
+ // action was played on.
+ let file = one_action(vec![
+ item("save", "Save", Some(save_as("PNGF", "/out/folder"))),
+ item("save", "Save", Some(save_as("PNGF", "/out/v1.png").with("DIDr", D::Boolean(true)))),
+ item("save", "Save", Some(save_as("PNGF", "/out/result.webp"))),
+ item("save", "Save", Some(save_as("GIFf", "/out/result.gif"))),
+ item("save", "Save", Some(desc("null").with("As ", D::Descriptor(desc("PNGF"))))),
+ // A format that isn't a descriptor, with and without a destination.
+ item("save", "Save", Some(desc("null").with("As ", long(1.0)))),
+ item("save", "Save", Some(desc("null").with("As ", long(1.0)).with("In ", path_value("/out/result.png")))),
+ // A destination with no format at all.
+ item("save", "Save", Some(desc("null").with("In ", path_value("/out/result.png")))),
+ ]);
+ let imp = import(&atn::write(&file).unwrap()).unwrap();
+ let ids: Vec<&str> = imp.actions[0].steps.iter().map(|(id, _)| id.as_str()).collect();
+ assert_eq!(ids, [PHOTOSHOP_STEP; 8]);
+ assert!(imp.actions[0].disabled.is_empty(), "kept saves stay on, so playback stops on them");
+ // The kept steps are written back byte for byte.
+ let a = &imp.actions[0];
+ let (bytes, skipped) = export("Saves", &[a], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let back = atn::parse(&bytes).unwrap();
+ for (out, orig) in back.actions[0].items.iter().zip(&file.actions[0].items) {
+ assert_eq!(out.descriptor, orig.descriptor);
+ }
+ }
+
+ #[test]
+ fn saves_round_trip_through_photoshop_events() {
+ let steps = vec![
+ ("file.saveAs".to_string(), json!({"path": "/out/result.psd"})),
+ ("file.saveACopy".to_string(), json!({"path": "/out/copy.webp"})),
+ ("file.save".to_string(), json!({})),
+ ];
+ let a = Action::new("A", steps.clone());
+ let (bytes, skipped) = export("Saves", &[&a], &[], false).unwrap();
+ assert!(skipped.is_empty());
+ let file = atn::parse(&bytes).unwrap();
+ let items = &file.actions[0].items;
+ assert!(items.iter().all(|i| i.event.id() == "save"));
+ let first = items[0].descriptor.as_ref().unwrap();
+ assert_eq!(get_obj(first, "As ").map(|f| trimmed(&f.class_id)).as_deref(), Some("Pht3"));
+ assert_eq!(first.get("In ").and_then(path_text).as_deref(), Some("/out/result.psd"));
+ assert_eq!(get_bool(items[1].descriptor.as_ref().unwrap(), "Cpy "), Some(true));
+ // Photoshop's own WebP class, not the plug-in's: Photoshop 2026 rejects `Google WebPShop`.
+ assert_eq!(get_obj(items[1].descriptor.as_ref().unwrap(), "As ").map(|f| trimmed(&f.class_id)).as_deref(), Some("WebPFormat"));
+ assert_eq!(import(&bytes).unwrap().actions[0].steps, steps);
+
+ // A Save As PhotoCraft can't express in Photoshop's terms is skipped, never exported as a
+ // plain Save.
+ let odd = Action::new("B", vec![("file.saveAs".to_string(), json!({"path": "/out/result.xcf"}))]);
+ assert!(export("Saves", &[&odd], &[], false).is_err());
+ }
diff --cc docs/file-format-parity.md
index e2c942067,af2eda436..cd10d554e
--- a/docs/file-format-parity.md
+++ b/docs/file-format-parity.md
@@@ -1,6 -1,6 +1,6 @@@
# File-format parity
- > **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-22 · **Change:** minor (`.asl` layer style libraries read and written, #1051; JPEG Options on File › Save, Save As and Save a Copy, FILE-215-19 partial (no Matte, progressive Scans or size preview); 32-bit Hue/Saturation unclipped and Colorize as Photoshop does them, Photoshop-oracle floor 190/258, #5781; JPEG Options on Save As and Save a Copy, FILE-215-19; TIFF compression for scripted saves, `tiffCompression`, #5301; the Nikon D4 white level follows the sample depth (12 and 14 bit), #5978; Apply Layer Comp action mapping, #7101; Cineon write: 10-bit gray/RGB; animated WebP frames load into video layers, #1198; Photoshop mixed-order TIFF type geometry, #4758; DDS textures save: uncompressed or BC1–BC3, optional mip chain, DDS Options in Save As (#1327); PSD smart filters: 53 filters (39 more: Pinch, Polar Coordinates, Ripple, Spherize, Twirl, Wave, ZigZag, Invert, Blur, Surface Blur, Smart Sharpen, Diffuse, Wind, Offset, Mezzotint, Clouds, Difference Clouds, Fibers, Lens Flare and others) plus Hue/Saturation and Perspective Warp mapped both ways, #6296, #6298, #6300, #6302, #6304, #6314, #6316, #6267, #6268, FILE-215-2; large-file fixtures: a 20 MP layered PSD, a 150-layer layout, a 2 GB PSD and a 4.4 GB PSB generated at test time and round-tripped, FILE-216-2 done, #5107; earlier: smart objects keep Photoshop's Cylinder warp through re-renders and saves, #4112; PNG `sTER` stereo pairing kept on save, #6063; PDF write one flattened page via Save As / Save a Copy / CLI, #3401; CMYK Invert, Posterize and Threshold on the inks; smart filter masks on PSD open and save; Photoshop-oracle floor 188/258; lossy DNG, compression 34892, decodes with its levels and LinearizationTable applied to the stored 8-bit samples, FILE-215-11; CMYK Hue/Saturation and Color Balance keep the black ink; CMYK Posterize on the stored values, psd-tools oracle floor 242/309; CMYK adjustment layers composite on the document's inks; Photoshop-oracle floor 165/258; CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; modern Brightness/Contrast's brightness curve; Photoshop-oracle floor 151/258; Lab documents composite on their stored L, a, b; Photoshop-oracle floor 152/258; Levels on whole levels at every step with Photoshop's shadow toe; Photoshop-oracle floor 146/258, psd-tools 238/309; 32-bit adjustments unclipped; Photoshop-oracle floor 149/258; mask feathers blur with their exact variance; Threshold splits on Photoshop's luminosity; a pass-through clipping base with an adjustment renders isolated; psd-tools oracle floor 240/309; 16-bit Posterize as Photoshop bins it; psd-tools oracle floor 241/309; Gradient Map luminosity; Photoshop-oracle floor 147/258; PSD: `Mt16`/`Mt32` merged transparency read; palette PNGs open in Indexed Color mode, #4804; 16-bit Lab Invert; Photoshop-oracle floor 145/258; `.atn` import maps 112 events; DDS textures open, #1327; DPX read and write, #1049; #2465 fixed: CS2 placed layers with only a `PlLd` block open their contents; Photoshop Actions `.atn` read and write; `.shc` contour files read and write; earlier the same day: indexed BMP palette mode; Save keeps a JPEG's quality and a WebP's encoding) · **Target:** Adobe Photoshop 2026
-> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-17 · **Change:** minor (`.atn`: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430; DDS textures save: uncompressed or BC1–BC3, optional mip chain, DDS Options in Save As (#1327); PSD smart filters: 41 filters (27 more: Blur, Surface Blur, Smart Sharpen, Diffuse, Wind, Offset, Mezzotint and others) plus Hue/Saturation and Perspective Warp mapped both ways, #6296, #6298, #6300, #6302, #6304, #6314, #6316, #6267, #6268, FILE-215-2; large-file fixtures: a 20 MP layered PSD, a 150-layer layout, a 2 GB PSD and a 4.4 GB PSB generated at test time and round-tripped, FILE-216-2 done, #5107; earlier: PNG `sTER` stereo pairing kept on save, #6063; PDF write one flattened page via Save As / Save a Copy / CLI, #3401; CMYK Invert, Posterize and Threshold on the inks; smart filter masks on PSD open and save; Photoshop-oracle floor 188/258; lossy DNG, compression 34892, decodes with its levels and LinearizationTable applied to the stored 8-bit samples, FILE-215-11; CMYK Hue/Saturation and Color Balance keep the black ink; CMYK Posterize on the stored values, psd-tools oracle floor 242/309; CMYK adjustment layers composite on the document's inks; Photoshop-oracle floor 165/258; CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; modern Brightness/Contrast's brightness curve; Photoshop-oracle floor 151/258; Lab documents composite on their stored L, a, b; Photoshop-oracle floor 152/258; Levels on whole levels at every step with Photoshop's shadow toe; Photoshop-oracle floor 146/258, psd-tools 238/309; 32-bit adjustments unclipped; Photoshop-oracle floor 149/258; mask feathers blur with their exact variance; Threshold splits on Photoshop's luminosity; a pass-through clipping base with an adjustment renders isolated; psd-tools oracle floor 240/309; 16-bit Posterize as Photoshop bins it; psd-tools oracle floor 241/309; Gradient Map luminosity; Photoshop-oracle floor 147/258; PSD: `Mt16`/`Mt32` merged transparency read; palette PNGs open in Indexed Color mode, #4804; earlier: CMYK Invert, Posterize and Threshold on the inks; 16-bit Lab Invert; Photoshop-oracle floor 145/258; `.atn` import maps 112 events; DDS textures open, #1327; DPX read and write, #1049; #2465 fixed: CS2 placed layers with only a `PlLd` block open their contents; Photoshop Actions `.atn` read and write; `.shc` contour files read and write; earlier the same day: indexed BMP palette mode; Save keeps a JPEG's quality and a WebP's encoding) · **Target:** Adobe Photoshop 2026
++> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-22 · **Change:** minor (`.atn`: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430; `.asl` layer style libraries read and written, #1051; JPEG Options on File › Save, Save As and Save a Copy, FILE-215-19 partial (no Matte, progressive Scans or size preview); 32-bit Hue/Saturation unclipped and Colorize as Photoshop does them, Photoshop-oracle floor 190/258, #5781; JPEG Options on Save As and Save a Copy, FILE-215-19; TIFF compression for scripted saves, `tiffCompression`, #5301; the Nikon D4 white level follows the sample depth (12 and 14 bit), #5978; Apply Layer Comp action mapping, #7101; Cineon write: 10-bit gray/RGB; animated WebP frames load into video layers, #1198; Photoshop mixed-order TIFF type geometry, #4758; DDS textures save: uncompressed or BC1–BC3, optional mip chain, DDS Options in Save As (#1327); PSD smart filters: 53 filters (39 more: Pinch, Polar Coordinates, Ripple, Spherize, Twirl, Wave, ZigZag, Invert, Blur, Surface Blur, Smart Sharpen, Diffuse, Wind, Offset, Mezzotint, Clouds, Difference Clouds, Fibers, Lens Flare and others) plus Hue/Saturation and Perspective Warp mapped both ways, #6296, #6298, #6300, #6302, #6304, #6314, #6316, #6267, #6268, FILE-215-2; large-file fixtures: a 20 MP layered PSD, a 150-layer layout, a 2 GB PSD and a 4.4 GB PSB generated at test time and round-tripped, FILE-216-2 done, #5107; earlier: smart objects keep Photoshop's Cylinder warp through re-renders and saves, #4112; PNG `sTER` stereo pairing kept on save, #6063; PDF write one flattened page via Save As / Save a Copy / CLI, #3401; CMYK Invert, Posterize and Threshold on the inks; smart filter masks on PSD open and save; Photoshop-oracle floor 188/258; lossy DNG, compression 34892, decodes with its levels and LinearizationTable applied to the stored 8-bit samples, FILE-215-11; CMYK Hue/Saturation and Color Balance keep the black ink; CMYK Posterize on the stored values, psd-tools oracle floor 242/309; CMYK adjustment layers composite on the document's inks; Photoshop-oracle floor 165/258; CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; modern Brightness/Contrast's brightness curve; Photoshop-oracle floor 151/258; Lab documents composite on their stored L, a, b; Photoshop-oracle floor 152/258; Levels on whole levels at every step with Photoshop's shadow toe; Photoshop-oracle floor 146/258, psd-tools 238/309; 32-bit adjustments unclipped; Photoshop-oracle floor 149/258; mask feathers blur with their exact variance; Threshold splits on Photoshop's luminosity; a pass-through clipping base with an adjustment renders isolated; psd-tools oracle floor 240/309; 16-bit Posterize as Photoshop bins it; psd-tools oracle floor 241/309; Gradient Map luminosity; Photoshop-oracle floor 147/258; PSD: `Mt16`/`Mt32` merged transparency read; palette PNGs open in Indexed Color mode, #4804; 16-bit Lab Invert; Photoshop-oracle floor 145/258; `.atn` import maps 112 events; DDS textures open, #1327; DPX read and write, #1049; #2465 fixed: CS2 placed layers with only a `PlLd` block open their contents; Photoshop Actions `.atn` read and write; `.shc` contour files read and write; earlier the same day: indexed BMP palette mode; Save keeps a JPEG's quality and a WebP's encoding) · **Target:** Adobe Photoshop 2026
Every format Photoshop 2026 (27.11.0) reads or writes, with PhotoCraft's support, fidelity and
tests. Photoshop's list comes from its `Info.plist` `CFBundleDocumentTypes`, the PiPL read/write
@@@ -131,8 -131,8 +131,8 @@@ remaining gaps in #1606 stay tracked wi
| LUTs `.cube` / `.3dl` / `.look` | R/W (Export Color Lookup) | R/W / R / R | `cms/src/lutfile.rs` |
| Keyboard shortcuts `.kys` | R/W | R/W | `engine/src/kys.rs` (`write`: Edit › Keyboard Shortcuts › Export…, rows carry our id; Photoshop reading our files is unverified) |
| ICC profiles | R | R | Own CMS |
- | Actions `.atn` | R/W | R/W | `psd/src/atn.rs` (version 16 sets, exact round trip), `engine/src/atn_cmds.rs` (Photoshop events ↔ commands, including Apply Layer Comp by name, #7101; other steps kept verbatim). Panel menu, CLI `batch --actions set.atn`, `actions.load`/`actions.save`. Photoshop 5-era version 12 files unsupported (AUTO-219-2) |
-| Actions `.atn` | R/W | R/W | `psd/src/atn.rs` (version 16 sets, exact round trip), `engine/src/atn_cmds.rs` (112 Photoshop events ↔ commands; other steps kept verbatim; Save As maps to `file.saveAs`/`file.saveACopy` when its destination is a file, #7102). Panel menu, CLI `batch --actions set.atn`, `actions.load`/`actions.save`. Photoshop 5-era version 12 files unsupported (AUTO-219-2) |
-| Styles `.asl` | R/W | no | #1693 |
++| Actions `.atn` | R/W | R/W | `psd/src/atn.rs` (version 16 sets, exact round trip), `engine/src/atn_cmds.rs` (Photoshop events ↔ commands, including Apply Layer Comp by name, #7101; other steps kept verbatim; Save As maps to `file.saveAs`/`file.saveACopy` when its destination is a file, #7102). Panel menu, CLI `batch --actions set.atn`, `actions.load`/`actions.save`. Photoshop 5-era version 12 files unsupported (AUTO-219-2) |
+| Styles `.asl` | R/W | R/W | `psd/src/asl.rs`, `io/src/asl_map.rs`; Styles panel Import/Export Styles…, `style.presets.importAsl`/`exportAsl` (#1051) |
| Contours `.shc` | R/W | R/W | `psd/src/shc.rs`; Contour Editor Load…/Save… (FILE-215-15). No user contour library; not yet checked against a Photoshop-written file |
| Custom shapes `.csh`, tool presets `.tpl` | R/W | no | |
| Curves `.acv`, Levels `.alv`, other adjustment presets | R/W | not audited | |
@@@ -142,14 -142,7 +142,15 @@@
| Date | Change | Summary |
|---|---|---|
+| 2026-10-22 | minor | 32-bit Hue/Saturation as Photoshop does it: the raised saturation isn't clipped (saturated colours leave 0..1), the chroma is scaled around the lightness by Photoshop's saturation factor (measured at every whole percent), so colours at or above lightness 1 keep their hue, and Colorize builds its colour with the saturation times 1 − \|Lightness\| (8 and 16 bits unchanged): photoshop rgb32 hue-saturation and hue-saturation-colorize pass; Photoshop-oracle floor 188 → 190 of 258 (#5781) |
+| 2026-10-19 | minor | JPEG Options on File › Save, Save As and Save a Copy (FILE-215-19 partial: no Matte, progressive Scans or size preview) |
+| 2026-10-18 | minor | Scripted TIFF saves take `tiffCompression` (none, LZW, ZIP), and the CLI `--tiff-compression` (#5301) |
+ | 2026-10-17 | minor | `.atn`: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430 |
+| 2026-10-17 | minor | `.atn`: Apply Layer Comp by name maps to `layerComp.apply` and exports as `applyComp` (#7101) |
+| 2026-10-15 | minor | Cineon write: Save As `.cin` stores 10-bit log gray/RGB frames (Cineon 4.5 header, three samples to a 32-bit word); a Cineon frame saved back keeps its code values |
+| 2026-10-14 | minor | 32-bit Hue/Saturation as Photoshop does it: the raised saturation isn't clipped (saturated colours leave 0..1) and the slider is cut to whole 8-bit levels, and Colorize builds its colour with the saturation times 1 − \|Lightness\| (8 and 16 bits unchanged): photoshop rgb32 hue-saturation and hue-saturation-colorize pass |
+| 2026-10-14 | minor | Lab documents round each adjustment layer's result on the stored L, a, b to whole samples, as Photoshop stores them (the native Lab path): photoshop lab8 curves.psd passes |
+| 2026-10-15 | minor | PSD smart filters: Clouds, Difference Clouds, Fibers and Lens Flare open as editable filters with their seeds, colours and lens, and save like Photoshop (checked against a Photoshop 27 file); render filters on a smart object work within the object, so a flare sits where Photoshop puts it |
| 2026-10-15 | minor | DDS textures save (#1327): uncompressed or BC1/BC2/BC3 (DXT1/3/5) from a clean-room block encoder, optional box-filtered mip chain, legacy header; DDS Options in Save As and Save a Copy, `ddsCompression`/`ddsMipmaps` for scripts, the CLI and MCP |
| 2026-10-16 | minor | PSD smart filters: Perspective Warp (`perspectiveWarpTransform`: `vertices`, `warpedVertices`, `quads` of vertex indices, document pixels) opens as `layer.smartObjects.perspectiveWarp`, one plane per quad, and re-renders warped; save writes the original item with only the geometry rewritten, or a new one in Photoshop's layout; inconsistent descriptors stay verbatim (FILE-215-2, #6268) |
| 2026-10-16 | minor | PSD smart filters: Hue/Saturation (`HStr`: `Clrz`, `Adjs` = master `Hst2` plus one per edited range with `LclR` and its four range sliders, all longs, measured on a Photoshop-saved file) opens as `image.adjustments.hueSaturation`, re-renders with the smart object and saves in Photoshop's layout; layouts outside it stay verbatim (FILE-215-2, #6267) |
diff --cc docs/gaps.md
index a3fc40357,13196b132..d878a675f
--- a/docs/gaps.md
+++ b/docs/gaps.md
@@@ -1,6 -1,6 +1,6 @@@
# Where PhotoCraft falls short of Photoshop
- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-22 · **Change:** minor (adjustment clipping stays visible in compact Properties, #5231; G9: Color panel modes, ramp and copy commands, the same in every theme, UI-217-17, #6000; G17: Help › Check for Updates and an opt-out check once per launch, DIST-220-1 partial, #5485; G10: `.asl` style libraries landed, #1051; G8: area type (TYPE-218-10); G1: smart objects keep Photoshop's Cylinder warp, #4112; G8: paragraph direction buttons in the Paragraph panel and options bar, TYPE-218-2 partial; G1: 32-bit Hue/Saturation and Colorize as Photoshop does them, Photoshop-oracle floor 190/258, #5781; G11: compound layer properties export as separate Photoshop Set events, rename last, #8304; G11: Batch and droplets take the result at the action's Save step, so actions ending in Save As and Close work; G11: `.atn` steps that switch to another open document import, play and save back, #7103; G14: the Nikon D4 white level follows the sample depth, so 12-bit D4 NEFs no longer open 2.6 stops dark, #5978; G14: a Nikon NEF's Adobe RGB preview is read as Adobe RGB (maker-note ColorSpace 0x001E), #5987; Apply Layer Comp action mapping, #7101; G10: JPEG Options dialog landed, FILE-215-19 partial (no Matte, progressive Scans or size preview); G10: Cineon write; G10: DPX read and write, #1049, Cineon and Amiga IFF read; Classical Object Finder improvement; learned segmentation remains open; G4: named, stateful section locks and visible keyboard focus in Brush Settings; G4: independent Brush Pose tilt-axis overrides, #3825 partial; G4: Transfer Mixer-only controls, #3825 partial; G9: Preferences › File Handling › Save in Background takes effect, #6207, 24 of 169 preferences do nothing; G7: Content-Aware Move previews every selection the command takes, coarse then exact, TOOL-213-4 done, #6680; G4: Pattern Stamp and Background Eraser draw live, TOOL-213-7; G9: Animated Zoom pref read: holding the Zoom tool zooms continuously, #6210, prefs that do nothing 25 of 166; G2: a cancelled 24 MP Gaussian Blur job stops in at most 44 ms, P25 under its 200 ms budget in local runs, baseline not re-run, #6205; G1: generated large-file fixtures, a 4.38 GB PSB opens on Windows through io, FILE-216-2 done, #5107; G9: fill and adjustment layers copy and paste whole, #2344; G1: smart filter masks show on PSD open, Photoshop-oracle floor 188/258; G10: DPX read and write, #1049, Cineon read; G1: CMYK Hue/Saturation and Color Balance keep the black ink; G1: CMYK Posterize on the stored values, psd-tools oracle floor 242/309; G1: CMYK adjustment layers composite on the document's inks, Photoshop-oracle floor 165/258; G1: CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; G1: modern Brightness/Contrast's brightness curve matches Photoshop, Photoshop-oracle floor 151/258; G1: Lab documents composite on their stored L, a, b, Photoshop-oracle floor 152/258; G1: Levels on whole levels at every step, Photoshop-oracle floor 146/258, psd-tools 238/309; G1: 32-bit Brightness/Contrast legacy, Channel Mixer, Photo Filter and Black & White tint unclipped as in Photoshop, Photoshop-oracle floor 149/258; G1: mask feathers blur with their exact variance, psd-tools oracle floor 240/309; G1: Threshold splits on Photoshop's luminosity, psd-tools oracle floor 241/309; G1: pass-through clipping base with an adjustment renders isolated, psd-tools oracle floor 240/309; G1: 16-bit Posterize as Photoshop bins it, psd-tools oracle floor 241/309; G1: Gradient Map driven by the W3C luminosity, Photoshop-oracle floor 147/258; G7: Field Blur's on-canvas pins, #3373; G4: Hue Jitter amount track, #3825 partial; G4: minimum field interaction, #3825 partial; G1: CMYK Invert, Posterize and Threshold on the inks, 16-bit Lab Invert; Photoshop-oracle floor 145/258; G11: `.atn` import maps 112 events: Select and Mask, Filter Gallery Spatter, Ripple, Crystallize, Pattern Fill layers, mask targeting, Step Backward, nudges in points, Bitmap mode; G5: Free Transform H/V skew fields; G9: toolbar tool shortcut editing; refreshed against main: G2, G5, G7, G9, G10, G13, G14, G17 items that landed; G10: DPX read and write, #1049; G4: checkbox-only Brush Settings rows; G11: Load/Save Actions `.atn` landed, AUTO-219-2 partial; G5: hold-a-key spring-loaded tools landed, #2672; G1: #2465 fixed; stale missing-tool rows corrected: Color Replacement, Red Eye and Add/Delete Anchor Point are live tools, so only Art History Brush is missing; no estimate changed) · **Target:** Adobe Photoshop 2026
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-19 · **Change:** minor (G11: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430; G9: Preferences › File Handling › Save in Background takes effect, #6207, 24 of 169 preferences do nothing; G7: Content-Aware Move previews every selection the command takes, coarse then exact, TOOL-213-4 done, #6680; G4: Pattern Stamp and Background Eraser draw live, TOOL-213-7; G9: Animated Zoom pref read: holding the Zoom tool zooms continuously, #6210, prefs that do nothing 25 of 166; G2: a cancelled 24 MP Gaussian Blur job stops in at most 44 ms, P25 under its 200 ms budget, #6205; G1: generated large-file fixtures, a 4.38 GB PSB opens on Windows through io, FILE-216-2 done, #5107; G9: fill and adjustment layers copy and paste whole, #2344; G1: smart filter masks show on PSD open, Photoshop-oracle floor 188/258; G10: DPX read and write, #1049, Cineon read; G1: CMYK Hue/Saturation and Color Balance keep the black ink; G1: CMYK Posterize on the stored values, psd-tools oracle floor 242/309; G1: CMYK adjustment layers composite on the document's inks, Photoshop-oracle floor 165/258; G1: CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; G1: modern Brightness/Contrast's brightness curve matches Photoshop, Photoshop-oracle floor 151/258; G1: Lab documents composite on their stored L, a, b, Photoshop-oracle floor 152/258; G1: Levels on whole levels at every step, Photoshop-oracle floor 146/258, psd-tools 238/309; G1: 32-bit Brightness/Contrast legacy, Channel Mixer, Photo Filter and Black & White tint unclipped as in Photoshop, Photoshop-oracle floor 149/258; G1: mask feathers blur with their exact variance, psd-tools oracle floor 240/309; G1: Threshold splits on Photoshop's luminosity, psd-tools oracle floor 241/309; G1: pass-through clipping base with an adjustment renders isolated, psd-tools oracle floor 240/309; G1: 16-bit Posterize as Photoshop bins it, psd-tools oracle floor 241/309; G1: Gradient Map driven by the W3C luminosity, Photoshop-oracle floor 147/258; G7: Field Blur's on-canvas pins, #3373; G4: Hue Jitter amount track, #3825 partial; G4: minimum field interaction, #3825 partial; G1: CMYK Invert, Posterize and Threshold on the inks, 16-bit Lab Invert; Photoshop-oracle floor 145/258; G11: `.atn` import maps 112 events: Select and Mask, Filter Gallery Spatter, Ripple, Crystallize, Pattern Fill layers, mask targeting, Step Backward, nudges in points, Bitmap mode; G5: Free Transform H/V skew fields; G9: toolbar tool shortcut editing; refreshed against main: G2, G5, G7, G9, G10, G13, G14, G17 items that landed; G10: DPX read and write, #1049; G4: checkbox-only Brush Settings rows; G11: Load/Save Actions `.atn` landed, AUTO-219-2 partial; G5: hold-a-key spring-loaded tools landed, #2672; G1: #2465 fixed; stale missing-tool rows corrected: Color Replacement, Red Eye and Add/Delete Anchor Point are live tools, so only Art History Brush is missing; no estimate changed) · **Target:** Adobe Photoshop 2026
++> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-22 · **Change:** minor (G11: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430; adjustment clipping stays visible in compact Properties, #5231; G9: Color panel modes, ramp and copy commands, the same in every theme, UI-217-17, #6000; G17: Help › Check for Updates and an opt-out check once per launch, DIST-220-1 partial, #5485; G10: `.asl` style libraries landed, #1051; G8: area type (TYPE-218-10); G1: smart objects keep Photoshop's Cylinder warp, #4112; G8: paragraph direction buttons in the Paragraph panel and options bar, TYPE-218-2 partial; G1: 32-bit Hue/Saturation and Colorize as Photoshop does them, Photoshop-oracle floor 190/258, #5781; G11: compound layer properties export as separate Photoshop Set events, rename last, #8304; G11: Batch and droplets take the result at the action's Save step, so actions ending in Save As and Close work; G11: `.atn` steps that switch to another open document import, play and save back, #7103; G14: the Nikon D4 white level follows the sample depth, so 12-bit D4 NEFs no longer open 2.6 stops dark, #5978; G14: a Nikon NEF's Adobe RGB preview is read as Adobe RGB (maker-note ColorSpace 0x001E), #5987; Apply Layer Comp action mapping, #7101; G10: JPEG Options dialog landed, FILE-215-19 partial (no Matte, progressive Scans or size preview); G10: Cineon write; G10: DPX read and write, #1049, Cineon and Amiga IFF read; Classical Object Finder improvement; learned segmentation remains open; G4: named, stateful section locks and visible keyboard focus in Brush Settings; G4: independent Brush Pose tilt-axis overrides, #3825 partial; G4: Transfer Mixer-only controls, #3825 partial; G9: Preferences › File Handling › Save in Background takes effect, #6207, 24 of 169 preferences do nothing; G7: Content-Aware Move previews every selection the command takes, coarse then exact, TOOL-213-4 done, #6680; G4: Pattern Stamp and Background Eraser draw live, TOOL-213-7; G9: Animated Zoom pref read: holding the Zoom tool zooms continuously, #6210, prefs that do nothing 25 of 166; G2: a cancelled 24 MP Gaussian Blur job stops in at most 44 ms, P25 under its 200 ms budget in local runs, baseline not re-run, #6205; G1: generated large-file fixtures, a 4.38 GB PSB opens on Windows through io, FILE-216-2 done, #5107; G9: fill and adjustment layers copy and paste whole, #2344; G1: smart filter masks show on PSD open, Photoshop-oracle floor 188/258; G10: DPX read and write, #1049, Cineon read; G1: CMYK Hue/Saturation and Color Balance keep the black ink; G1: CMYK Posterize on the stored values, psd-tools oracle floor 242/309; G1: CMYK adjustment layers composite on the document's inks, Photoshop-oracle floor 165/258; G1: CMYK Brightness/Contrast on the inks, CMYK Threshold's luma; G1: modern Brightness/Contrast's brightness curve matches Photoshop, Photoshop-oracle floor 151/258; G1: Lab documents composite on their stored L, a, b, Photoshop-oracle floor 152/258; G1: Levels on whole levels at every step, Photoshop-oracle floor 146/258, psd-tools 238/309; G1: 32-bit Brightness/Contrast legacy, Channel Mixer, Photo Filter and Black & White tint unclipped as in Photoshop, Photoshop-oracle floor 149/258; G1: mask feathers blur with their exact variance, psd-tools oracle floor 240/309; G1: Threshold splits on Photoshop's luminosity, psd-tools oracle floor 241/309; G1: pass-through clipping base with an adjustment renders isolated, psd-tools oracle floor 240/309; G1: 16-bit Posterize as Photoshop bins it, psd-tools oracle floor 241/309; G1: Gradient Map driven by the W3C luminosity, Photoshop-oracle floor 147/258; G7: Field Blur's on-canvas pins, #3373; G4: Hue Jitter amount track, #3825 partial; G4: minimum field interaction, #3825 partial; G1: CMYK Invert, Posterize and Threshold on the inks, 16-bit Lab Invert; Photoshop-oracle floor 145/258; G11: `.atn` import maps 112 events: Select and Mask, Filter Gallery Spatter, Ripple, Crystallize, Pattern Fill layers, mask targeting, Step Backward, nudges in points, Bitmap mode; G5: Free Transform H/V skew fields; G9: toolbar tool shortcut editing; refreshed against main: G2, G5, G7, G9, G10, G13, G14, G17 items that landed; G10: DPX read and write, #1049; G4: checkbox-only Brush Settings rows; G11: Load/Save Actions `.atn` landed, AUTO-219-2 partial; G5: hold-a-key spring-loaded tools landed, #2672; G1: #2465 fixed; stale missing-tool rows corrected: Color Replacement, Red Eye and Add/Delete Anchor Point are live tools, so only Art History Brush is missing; no estimate changed) · **Target:** Adobe Photoshop 2026
Every known shortfall against Photoshop 2026 (27.11.0), one entry each, ranked by user impact
on the way to beta. This is the work list agents pick from: take the highest-ranked entry that
@@@ -118,18 -106,11 +118,23 @@@ what an agent can't finish alone
mapped events (paths, scripts, Generative Fill, Filter Gallery effects other than Spatter,
Duplicate Layers into a new document, Bitmap halftone screens…) load as kept Photoshop steps
that fail at playback by name.
+- **Done 2026-10-21:** Batch and droplets take each result at the action's recorded Save, Save As
+ or Save a Copy step, written to the destination folder (Photoshop's "Override Action 'Save As'
+ Commands"). A document closed after its save is written as the save found it, so actions ending
+ in Save As and Close no longer fail on every file, and a Close that leaves another document
+ active no longer saves that one instead. While the saved document stays open, the steps after
+ the save still apply (#3058). Saves inside a played action, and the CLI's `batch` loop, still
+ save after the action.
+- **Done 2026-10-19:** `.atn` steps that switch to another open document (a `select` of `Dcmn` by
+ offset: the previous, next or Nth tab from the active one) import as `document.activate {"offset"}`,
+ play and save back in the same shape, so actions that copy from one open document and paste into
+ another no longer stop at the switch (#7103). An offset past the first or last open document is
+ refused, not wrapped.
+ - **Done 2026-10-17:** a recorded Save As imports with its format and destination file
+ (`file.saveAs`, or `file.saveACopy` for As a Copy) instead of as a plain Save, which wrote
+ over the file the action was played on (#7102). A folder destination, an unmapped format or a
+ mismatched extension stays a kept Photoshop step, so playback stops before writing; folder
+ saves wait for #5430.
- **Done 2026-10-12:** Load/Save Actions `.atn` in the panel menu, `batch --actions set.atn`
and `actions.load`/`actions.save`; 112 Photoshop events map to commands both ways (Transform,
Apply Image, Save for Web, smart-object edits, Gradient Map, Quick Mask, polygon selections,
@@@ -353,25 -292,10 +358,26 @@@
| Date | Change | Summary |
|---|---|---|
+| 2026-10-22 | minor | G17: Help › Check for Updates and an opt-out check once per launch (#5485), DIST-220-1 partial; estimate unchanged |
+| 2026-10-22 | minor | G1: 32-bit Hue/Saturation unclipped with Photoshop's saturation factor, bright colours keep their hue, Colorize's saturation scaled by 1 − \|Lightness\|; photoshop rgb32 hue-saturation and hue-saturation-colorize pass; Photoshop-oracle floor 188 → 190 of 258 (#5781) |
+| 2026-10-21 | minor | G9: adjustment clipping remains visible in compact Properties (#5231); no readiness percentage or estimate changed |
+| 2026-10-21 | minor | #8304: compound layer properties export as separate Set events, rename last; independent Photoshop replay pending; percentages and estimates unchanged |
+| 2026-10-21 | minor | G11: Batch and droplets take the result at the action's recorded Save / Save As step (Photoshop's "Override Action 'Save As' Commands"); estimate unchanged |
+| 2026-10-22 | minor | G8: Auto / Left-to-right / Right-to-left paragraph direction buttons in the Paragraph panel, Properties and the Type options bar (#6793); TYPE-218-2 partial (the visual RTL caret is still missing, and PSD doesn't store the direction yet) |
+| 2026-10-19 | minor | G10: JPEG Options dialog landed (FILE-215-19 partial: no Matte, progressive Scans or size preview); no readiness percentage or estimate changed |
+| 2026-10-19 | minor | G11: `.atn` steps that select another open document by offset import as `document.activate {"offset"}`, play and save back (#7103); estimate unchanged |
+ | 2026-10-19 | minor | G11: a recorded Save As imports with its format and file (`file.saveAs`, `file.saveACopy` for As a Copy) instead of as a plain Save that wrote over the played file, #7102; folder destinations stop playback until #5430 |
+| 2026-10-18 | minor | G13: Russian gained the 1,229 dynamic UI labels other catalogs already had (filter and adjustment parameters, Camera Raw, lighting, History/Layers/paths menus, metadata, System Info, status templates, dialogs); engine messages and native review remain open |
+| 2026-10-17 | minor | Classical Object Finder improvement; learned segmentation remains open |
+| 2026-10-15 | minor | G10: Cineon write landed (10-bit log gray/RGB, Save As `.cin`) |
+| 2026-10-14 | minor | G1: 32-bit Hue/Saturation unclipped (slider on whole levels) and Colorize's saturation scaled by 1 − \|Lightness\|; photoshop rgb32 hue-saturation and hue-saturation-colorize pass |
+| 2026-10-14 | minor | G1: Lab adjustment layers' results are whole samples (native Lab path); photoshop lab8 curves passes |
+| 2026-10-19 | minor | G9: Color panel modes, ramp and copy commands from its panel menu, the same in every theme (UI-217-17 done, #6000) |
| 2026-10-15 | minor | G1 / #5972 A1: render only provably constant-RGB `GdFl` noise fills; variable noise synthesis remains open |
+| 2026-10-20 | minor | G10: `.asl` layer style library import and export landed (#1051) |
| 2026-10-18 | minor | G9: with no selection, Copy takes fill and adjustment layers whole and Paste recreates them (#2344); UI-217-23 stays partial (a single pixel layer copies its pixels only); estimate unchanged |
-| 2026-10-15 | minor | G2: a cancelled 24 MP Gaussian Blur job stops within 44 ms max (P25, budget 200 ms; was about 400 ms), the uncancelled job about 40% faster; #6205 |
+| 2026-10-17 | minor | G11: `.atn` Apply Layer Comp imports, plays and exports by comp name (#7101); other reference forms remain unsupported |
+| 2026-10-15 | minor | G2: a cancelled 24 MP Gaussian Blur job stops within 44 ms max (P25, budget 200 ms; was about 400 ms; local runs, baseline not re-run), the uncancelled job on a locked-transparency layer about 40% faster; #6205 |
| 2026-10-15 | minor | G9: Animated Zoom preference takes effect (hold the Zoom tool to zoom continuously, #6210); prefs that do nothing 25 of 166; no estimate changed |
| 2026-10-16 | minor | G7: Content-Aware Move's live preview covers every selection the command takes (over 256 × 256: a coarse result solved scaled down, then the exact one); TOOL-213-4 done (#6680) |
| 2026-10-15 | minor | G9: Save in Background off saves in the foreground under a modal progress dialog (#6207); preferences that do nothing 25 → 24 of 169 |