gray transform, array to image,