Copy link to clipboard
Copied
I need to find the horizontal center of a LAYER not the entire document. I have Rulers enabled, and I'm snapping to guides, but unlike the tutorials I've read, the ruler guide that I pull down doesn' snap, or even light up, at any point.
I have Photoshop Creative Cloud 20.0.4 on an iMac with the Mojave 10.14.6.
{Thread renamed by moderator}
The usual way is to select the Move Tool and check Show Transform Controls so you can see the layer center indicated by the Reference Point in the Center, then the Guides will snap to the center Reference Point.
For whatever reason adobe decided to make some changes so now one has to go the Photoshop Preferences>Tools and Click Show Reference Point when Using Transform to see the Reference Point.
Copy link to clipboard
Copied
Hi There,
Thanks for reaching out the Adobe Community!
As you're looking to find the horizontal center point of a Layer in Photoshop, would suggest you to update Photoshop to version 20.0.6 which is the most recent update and let us know if it helps.
Also, you may have a look here and see how it goes: https://helpx.adobe.com/in/photoshop/using/aligning-layers.html
Regards,
Sahil
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Do you have snap turned on?
Copy link to clipboard
Copied
The usual way is to select the Move Tool and check Show Transform Controls so you can see the layer center indicated by the Reference Point in the Center, then the Guides will snap to the center Reference Point.
For whatever reason adobe decided to make some changes so now one has to go the Photoshop Preferences>Tools and Click Show Reference Point when Using Transform to see the Reference Point.
Copy link to clipboard
Copied
Jeff, the trouble is now that if you use transform to place guides, you have the move tool selected and you have to hold the shift key, when you start, but let it up once you start dragging, or the guide will disappear when you quit the transform.
Copy link to clipboard
Copied
The following script will find the horizontal and vertical centre of the active layer. It will add guides and a colour sampler to the centre and also report the co-ordinates via a window. It should be simple enough to alter as required:
//community.adobe.com/t5/Photoshop/How-can-I-find-the-center-of-a-layer-in-Photoshop/td-p/10661864
// How can I find the center of a layer in Photoshop?
#target photoshop;
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var doc = activeDocument;
var layerBounds = doc.activeLayer.bounds
var hor = layerBounds[2]-layerBounds[0];
var ver = layerBounds[3]-layerBounds[1];
var hCentre = hor/2+layerBounds[0];
var vCentre = ver/2+layerBounds[1];
// Add horizontal guide
doc.guides.add(Direction.HORIZONTAL, vCentre);
// Add vertical guide
doc.guides.add(Direction.VERTICAL, hCentre);
// Add colour sampler to centre of layer
doc.colorSamplers.add([hCentre, vCentre]);
// Report the co-ordinates in pixels
alert('Active Layer Centre Point' + '\n' + 'X: ' + hCentre + '\n' + 'Y: ' + vCentre);
app.preferences.rulerUnits = savedRuler;
//doc.colorSamplers.removeAll();
//doc.guides.removeAll();
Find more inspiration, events, and resources on the new Adobe Community
Explore Now