Added function to get an image's natural size