There is an ImageView and it has an Image, which has been zoomed and rotated.
See the picture:

The image is scaled by android.graphics.Matrix.
You can see there is red point which is the center point of the image, and also a blue border. How to calculate them?
(Update: I want to operate on the image of the girl inside the blue border, not the whole picture, that’s background)
There is a mathematical dependency between two. If there is other information available:
-assuming rectangle has right angles for all corners-.
Where aCorner is a arbitrary corner and oppositeCorner is opposite corner to aCorner.
This was trivial, a little more hard work included to calculate borders (and a bit more of information; center position, width and the height of the picture and rotation angle).
Assuming image’s width is “w”, height is “h”, angle is “a”, and center “cX” and “cY”.
First corner;
Second corner;
Third;
Fourth;
Length is a half of diagonal of the rectangle. The inner part with cos and sin is result of trigonometric transformation:
And cX and cY is used to translate corners from a arbitrary coordinate system to a specific coordinate system.
I know, I know this was kind of overkill. Matrix class may have this functions on its own. I believe if it has, the method used in it can be broken into method I described here.
NOTE: Angle a -actually even sin(a) and cos(a), which is better- can be accessed via
Matrix.getValues(float[] values)
Most 2D matrices use this scheme:
I am not sure about particular implementation of Android API.
BTW, there may have been some signature errors up there so be careful.