Do you mean to say that your document has frames that has text and images in it and some of them have overset. So you need a code to find frames with overset and if there is any image in it then resize the image to remove the overset? What is the logic you would want to resize the image?
Please elaborate on the issue
Search the forum.
I think, we already had this question some months ago and it was answered sufficiently.