determination of the original image file extension