Dear Experts:
I need to crop a batch of photographs by 40 pixels on each side. They all have totally different sizes. It is the 40 pixels on each side which will be constant.
Is it possible to run a script for this task or may be even an action I do not know how to set up.
Help is much appreciated.
Thank you very much in advance.
Regards, Andreas
batch crop images on each side by 40 pixels
Re: batch crop images on each side by 40 pixels
To use this script, copy it to Presets / Scripts of your Photoshop folder.
Then reopen Photoshop and you will find it on the list in of File / Scripts.
You may also try my other very similar script: https://forums.adobe.com/message/8948511#8948511
Then reopen Photoshop and you will find it on the list in of File / Scripts.
Code: Select all
if (fld = Folder.selectDialog('Select folder:')) {
preferences.rulerUnits = Units.PIXELS,
(prc = Folder(fld + '/Processed')).create()
for(fld = fld.getFiles(/jpg|psd/i); i < fld.length; i++) {
open(fld[i]), (aD = activeDocument).resizeCanvas(aD.width - 40, aD.height - 40)
aD.saveAs(File(prc + '/' + aD.name)), aD.close(SaveOptions.DONOTSAVECHANGES)
}
}
- Attachments
-
- Canvas Resize 2.rar
- (557 Bytes) Downloaded 1121 times