@rg0401 – Select the layers and run this script, first changing the W and H scale value and anchor point as indicated in the script comments:
function resizeLayer() {
/*
AnchorPosition.BOTTOMCENTER
AnchorPosition.BOTTOMLEFT
AnchorPosition.BOTTOMRIGHT
AnchorPosition.MIDDLECENTER
AnchorPosition.MIDDLELEFT
AnchorPosition.MIDDLERIGHT
AnchorPosition.TOPCENTER
AnchorPosition.TOPLEFT
AnchorPosition.TOPRIGHT
*/
// W%, H%, Anchor/Reference point location
// Change as required:
activeDocument.activeLayer.resize(50, 50, AnchorPosition.BOTTOMLEFT);
}
var s2t = stringIDToTypeID;
(r = new ActionReference).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var lrs = executeActionGet(r).getList(p),
sel = new ActionReference();
for (var i = 0; i < lrs.count; i++) {
sel.putIdentifier(s2t('layer'), p = lrs.getReference(i).getIdentifier(s2t('layerID')));
(r = new ActionReference).putIdentifier(s2t('layer'), p);
(d = new ActionDescriptor()).putReference(s2t("target"), r);
executeAction(s2t('select'), d, DialogModes.NO);
resizeLayer();
}
- Copy the code text to the clipboard
- Open a new blank file in a plain-text editor (not in a word processor)
- Paste the code in
- Save the text file as .txt
- Rename the file extension from .txt to .jsx
- Install or browse to the .jsx file to run:
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html#Photoshop