fixed contructor in dilate gray