code: public Img toImg(TransferFunction transferFunc){
  		Img img = new Img(getDimension());
  		if(hasAlpha()){
  			img.forEach(px->px.setValue(transferFunc.toARGB(
  					getDataA()[px.getIndex()],
  					getDataR()[px.getIndex()],
  					getDataG()[px.getIndex()],
  					getDataB()[px.getIndex()])));
  		} else {
  			img.forEach(px->px.setValue(transferFunc.toRGB(
  					getDataR()[px.getIndex()],
  					getDataG()[px.getIndex()],
  					getDataB()[px.getIndex()])));
  		}
  		return img;
  	}
docs: Copies this image's data to a new {@link Img}.
  The specified {@link TransferFunction} is used to map this
  image's channel values to 8bit per channel ARGB values.
  
  @param transferFunc to transform a pixel value to the required 8bit per channel ARGB value
  @return an Img with this image's data copied to it