double scale(final int pixels,final int total){
  double distance=Math.max(upper - lower,0);
  double fraction=((double)pixels) / total;
  LOGGER.debug("pixels: " + pixels + " total: "+ total+ " scaled: "+ fraction * distance);
  return fraction * distance;
}

double scale ( final int pixels , final int total ) { double distance = Math . max ( upper - lower , 0 ) ; double fraction = ( ( double ) pixels ) / total ; LOGGER . debug ( "pixels: " + pixels + " total: " + total + " scaled: " + fraction * distance ) ; return fraction * distance ; }
scales the percentage of bytes that meet the threshold to the provided upper and lower bound .
