public Texture toAverage() // builds the averidge of the channels { for (var i = width * height - 1; i >= 0; i--) { pixel[i] = ColorUtility.getAverage(pixel[i]); } return(this); }