A script to find the center of Gravity of irregular image?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Mcquiff

A script to find the center of Gravity of irregular image?

Post by Mcquiff »

Not sure how I might implement this in to exist code.... So I need to think about that too, but How might it work???

What I have is cut out or an image (my images are hollow on the middle so I need to turn it into a solid.

Method
Magic Wand Background,
invert selection
make work path

Now can I find the center of this work path? Then use this to place the crop tool over its center?

And then begin the center of a crop from there?


I found this, it might be useful although a little to old.
http://forums.adobe.com/message/2376791