Sets each pixel in a window to a random grayscale value