i initially jotted down .crop(b[0], b[1], b[2], b[3]) because it made sense for them to line up like that but this is what the developer console is reporting at the present moment
I was just looking at crop, thinking bounds should be optional. In the case of absent bounds, it should act on the current selection bounds – just like how it works via the UI.
We really need to add an example for crop. The first argument is the Bounds object. .crop(b) in your example.
const a = app.activeDocument;
const b = a.selection.bounds;
if (b) {
a.crop([b[0], b[3], b[2], b[1]]);
} else {
alert(“Please make a selection before running the script.”);
only because it was invited but i wasnt debugging, & it works as it is meant to when i used it. it just bothers me why, how, & that the different argument pattern exists.