code: public static GenericColorChannelTransformation fromFunction(Function<Double, Double> fn){
  		Objects.requireNonNull(fn);
  		return fromFunctions(fn, fn, fn, fn);
  	}
docs: <p>
  Try this function for contrast stretching:<br>
  {@code v->(1+Math.cos(v*Math.PI+Math.PI))/2}
  
  @param fn
  @return