Calculate ThreePatch divisions from image itself.