I think the guide may have confused you. The bounds in the crop defines what part of the original image you want to keep. You can use the bounds alone to define the crop. If you supply the width and height arguments Photoshop will also resize the document as well as crop.
But the DOM crop method does not change the document's resolution.
Yes, the optional width and height parameters do indeed resize. You know your stuff. That was the confusion -- the Reference wasn't too clear on that. Now, I understand. Seems odd, though, not to have a resolution option (or change because of the crop as it does in real life). One of the scripts I downloaded tacked on a resolution parameter after the width and height, but it had no effect, of course. BTW, Adobe Reader X has a few bugs on my my machine, so I can't move around the Reference Manual within 15 or 20 minutes of opening a document -- it freezes up. Not worried about it as I'm sure that'll be straightened out soon.
Thank you Michael. With your help and the help of others, I might just figure this script business out.
1 person found this helpful
You can use the scriptlistener plug-in to make a crop function that has all the options of the crop tool in the GUI.
However, if you do use the DOM crop method then resize after the crop with document.resizeImage() you can control the resample method in addition to the width,height, and resolution.