Copy link to clipboard
Copied
It's easy enough to specify a guide position relative to the top or left edge of an image. I do it regularly in distance, percent or even pixels. Is there any simple way to specify the position relative to the bottom or right edge? I'll want to put this in an action and apply it to images of differing aspect ratios. Thanks.
Please try
View > Guides > New Guide Layout
Copy link to clipboard
Copied
Please try
View > Guides > New Guide Layout
Copy link to clipboard
Copied
Followup question. The "New Guide Layout" solved my basic problem. I'm happy. But I'm also curious. The dialog seems to allow for specifying the color but no matter what color I specify, the guides are black. Guides dragged out from the edges follow the colors selected in preferences. I can work around the black guides, but why can't I specify the color since the dialog seems to offer that option?
Copy link to clipboard
Copied
Guides can be scripted as well, you can get the document size and calculate where to place a new guide from that.
Copy link to clipboard
Copied
@Lumigraphics wrote:
Guides can be scripted as well, you can get the document size and calculate where to place a new guide from that.
Yes, that was my thought too!
I hit a brick wall on the syntax for an arbitrary unit override:
#target photoshop
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var rightEdge = activeDocument.height.value;
var bottomEdge = activeDocument.width.value;
activeDocument.guides.add(Direction.HORIZONTAL, rightEdge - 25);
activeDocument.guides.add(Direction.VERTICAL, bottomEdge - 25);
app.preferences.rulerUnits = savedRuler;
In the above example, I'm working in the rulerUnits of Units.PIXELS – using a 25px "offset" from the right hand side and bottom edge of the canvas for the guide position. But what if the offset needed to be say 10% of the canvas? The syntax of the override for UnitValue() was tripping me up.
Copy link to clipboard
Copied
Another way - drag from the top left of the rulers (where they intersect at the top left of the document window) and you can set the zero point to wherever you want e.g. bottom right. Now you can position guides using the ruler from that mark.
To reset the ruler zero point just double click on that same spot
Dave
Copy link to clipboard
Copied
Thank you all. The "New Guide Layout" worked for what I need. I had played with that earlier but didn't realize I could save and name a layout. And then select that layout when recording the action. Works just the way I wanted. Every time I post here, someone has an answer that solves my problem. Thanks again.
Copy link to clipboard
Copied
@davescm wrote:
Another way - drag from the top left of the rulers (where they intersect at the top left of the document window) and you can set the zero point to wherever you want e.g. bottom right. Now you can position guides using the ruler from that mark.
To reset the ruler zero point just double click on that same spot
Dave
Adding to this alternative mentioned by Dave, setting the ruler origin point can't be recorded in an action, which limits what can be done with such automation. A script can change and reset the origin point: