change parameters to gray image