Copy link to clipboard
Copied
I want to define a 100x100 pixel square in the center of an images of arbitrary sizes using guides, and I'd like to do it through an action so I can use it with automate batch. How can I do this?
I feel like I should be able to do this with New Guide Layout, but for some reason it doesn't have an option to center rows.
Something like this?
Otherwise, a scripted option that can be recorded into the action for batching:
#target photoshop;
//activeDocument.guides.removeAll();
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var hCentre = activeDocument.width/2;
var vCentre = activeDocument.height/2;
activeDocument.guides.add(Direction.HORIZONTAL, vCentre + 50);
activeDocument.guides.add(Direction.HORIZONTAL, vCentre - 50);
activeDocument.guides.add(Direction.VERTI
...
How about this:
Copy link to clipboard
Copied
Can you show a screenshot of your new guides layout panel? What are you trying to do that it's not doing?
Jane
Copy link to clipboard
Copied
Here you go. The 100x100 area isn't centered vertically. How do I fix that?
Copy link to clipboard
Copied
Something like this?
Otherwise, a scripted option that can be recorded into the action for batching:
#target photoshop;
//activeDocument.guides.removeAll();
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var hCentre = activeDocument.width/2;
var vCentre = activeDocument.height/2;
activeDocument.guides.add(Direction.HORIZONTAL, vCentre + 50);
activeDocument.guides.add(Direction.HORIZONTAL, vCentre - 50);
activeDocument.guides.add(Direction.VERTICAL, hCentre + 50);
activeDocument.guides.add(Direction.VERTICAL, hCentre - 50);
app.preferences.rulerUnits = savedRuler;
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
How about this:
Copy link to clipboard
Copied
@Semaphoric – Even better!
Copy link to clipboard
Copied
@gregd – are you still out there?