How to get the size of the picture after streched

I have a node inside that I have a image I am using Uniform imagestretch, but after stretch the actual bounds of the image are not changed it is sticked to the orginal image size. Is there anyway to get the size of the image after it is stretched.

I am using the below,
The third picture shows how a GraphObject.Uniform imageStretch will make sure that all of the image is shown, at the expense of reducing the scale and leaving some empty space at the sides or at the top and bottom. In this case, because the natural image aspect ratio is wider than the available 60x80 aspect ratio, the empty space will be at the top and bottom.

I need to remove the empty space at top and bottom or I want to get the new image size.

That isn’t something that we store. The best way to go about it would be to take your image’s dimensions and calculate the scaling ratio yourself. Just take the source image’s width divided by the width of the area you want to place it, and do the same with the height. Then take the minimum of those ratios, multiply by the source image width and height, and you’ve got your size.

Math.min(sourceWidth / areaWidth, sourceHeight, areaHeight)