Rescales all the pixel values in a file