I was debating over that. I could also open the image and get the spec.format to be more accurate. Though file extension may be enough.