extracts image dimensions