Answer the question
In order to leave comments, you need to log in
How to make a canvas enlargement macro for all photos?
Hello! Maybe someone knows how to make a macro in Photoshop so that the size of the canvas from below increases by 170px on all images?
Answer the question
In order to leave comments, you need to log in
var uMargin = new UnitValue("170 pixels");
var dir = new Folder("D:\\ImagesFolder");
app.playbackDisplayDialogs = DialogModes.NO;
if (dir != null) {
var fileList = dir.getFiles("*.jpg");
for (var i = 0; i < fileList.length; i++) {
try {
open( fileList[i] );
app.activeDocument.resizeCanvas(app.activeDocument.width,app.activeDocument.height+uMargin,AnchorPosition.TOPCENTER);
app.activeDocument.save(SaveOptions.SAVECHANGES);
app.activeDocument.close();
}
catch(e) {
// бла-бла
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question