static float convertToLinearQuality(float quality){
  if (quality <= 0.0F) {
    quality=0.01F;
  }
  if (quality > 1.00F) {
    quality=1.00F;
  }
  if (quality < 0.5F) {
    quality=0.5F / quality;
  }
 else {
    quality=2.0F - (quality * 2.0F);
  }
  return quality;
}

static float convertToLinearQuality ( float quality ) { if ( quality <= 0.0F ) { quality = 0.01F ; } if ( quality > 1.00F ) { quality = 1.00F ; } if ( quality < 0.5F ) { quality = 0.5F / quality ; } else { quality = 2.0F - ( quality * 2.0F ) ; } return quality ; }
converts an imagewriteparam ( i . e . ijg ) non - linear quality value to a float suitable for passing to jpegqtable . getscaledinstance ( ) .
