Get the dimensions of an image from a file input