implemented a utility function to obtain an images original width and height from file