Get the dimensions of an image.