code: public int getIndexOfMinValue(int channel){
  		double[] values = getData()[channel];
  		int index = 0;
  		double val = values[index];
  		for(int i = 1; i < numValues(); i++){
  			if(values[i] < val){
  				index = i;
  				val = values[index];
  			}
  		}
  		return index;
  	}
docs: Returns the index of the minimum value of the specified channel.
  @param channel one of {@link #channel_r},{@link #channel_g},{@link #channel_b},{@link #channel_a} (0,1,2,3)
  @return index of minimum value of specified channel
  @throws ArrayIndexOutOfBoundsException if the specified channel is not in [0,3]
  or is 3 but the image has no alpha (check using {@link #hasAlpha()}).
  @see #getIndexOfMaxValue(int)
  @see #getIndexOfMinValue(int)
  @see #getMaxValue(int)
  @see #getMinValue(int)