title: what mean bitmap.compress() parameter 'quality'?
body: <p>In my app, i send some image to server.
  images max size is 300kb, i'll resize file.</p>
  
  <p>this is my resize code.</p>
  
  <pre><code>public static void resize_filesize(Context context, Uri uri, int maxSize) {
      int filesize;  
      int compressRate;
      try {
  
          InputStream inputStream = context.getContentResolver().openInputStream(uri);
          filesize = inputStream.available();
          inputStream.close();
  
          compressRate = ((100*maxSize) / filesize);
  
          File storageDir = new File(Environment.getExternalStorageDirectory() + context.getString(R.string.photoPath));
          File image = new File(storageDir,"resize.jpg");
  
          FileOutputStream outputStream = new FileOutputStream(image);
          Bitmap bitmap = MediaStore.Images.Media.getBitmap(context.getContentResolver(), uri);
          bitmap.compress(Bitmap.CompressFormat.JPEG, compressRate, outputStream);
  
          outputStream.close();
  
          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
              uri = FileProvider.getUriForFile(context,
                      BuildConfig.APPLICATION_ID + ".provider", image);
          } else {
              uri = Uri.fromFile(image);
          }
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>i think this.
  if original image size is 500kb, i need 300kb.
  than i set quality:60, image will 60% compress and it become 300kb.</p>
  
  <p>but i try it, so much compress work.
  this is my log.</p>
  
  <pre><code>original : 831210(811kb)
  maxsize : 307200(300kb)
  rate :  35
  final size : 95053(92kb)
  </code></pre>
  
  <p>what happen???</p>
  
  <p>ofcource i want resize, but it's too small!</p>
  
  <p>what did i do wrong?
  'quality' isnt mean % ? than how can i get 'near' maxsize image?</p>
  
  <p>in android document, just say it mean compress size...</p>