rescale image to ignore initial dark pixels