-
1. Re: Find Visual Centre of a layer
c.pfaffenbichler Aug 21, 2013 8:15 AM (in response to Mattmcquiff)So possibly via applescript.
You may want to check over in the Photoshop Scripting Forum
http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions
but I guess most of the regulars don’t bother much with AppleScript.
By which I do not mean that AppleScript is bad, but it has no relevance for Windows users so the more popluar language for Photoshop Scripting is JavaScript.
-
2. Re: Find Visual Centre of a layer
Mylenium Aug 21, 2013 8:18 AM (in response to Mattmcquiff)AFAIK that's stuff only filters can do. One would probably sample columns/ rows or randomly angled lines and process their histogram to find the middle between some "peaks". Averaging multiple such results would then provide a center point. Additional processing could also eliminate any appendages that would skew the result. Of course this could be amped up indefinitely e.g. by calculating the gradinet vectors based on thresholds and finding the center that is farthest away from any "edges" or detecting the densest samples in DCT transforms or whatever. A million ways to go about this, but definitely beyond simple scripting or actions.
Mylenium
-
3. Re: Find Visual Centre of a layer
Mattmcquiff Aug 21, 2013 8:42 AM (in response to Mylenium)the nearest I think I could get,
Copy to clipboard the entire layer
Crop the vertical by half, with anchor point bottom centre,
Trim based on transparent pixels
From this you should have the centre point of the bottom half of the image, then some how replace from the infomation in the clipboard.....



