Get Image dimensions of imported images

Is there a way to get the height and width of an image that was loaded via an xml file? I am making an Image Viewer and I want the display to resize to the dimensions of the image loaded.

Thanks