title: Android save Bitmap with high quality or improve Bitmap quality
body: <p>this is my code:</p>
  
  <pre><code> public void onActivityResult(int reqCode, int resCode, Intent data) {
      if (reqCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE &amp;&amp; resCode == RESULT_OK) {
          if (data.getData() == null) {
              Bitmap bm = (Bitmap)
                      data.getExtras().get("data");
              productImageImgView.setImageBitmap(bm);
              productImageImgView.setVisibility(View.VISIBLE);
              String timeStamp = new SimpleDateFormat(
                      "yyyyMMdd_HHmmss").format(new Date());
  
              File pictureFile = new File(Environment
                      .getExternalStoragePublicDirectory(
                              Environment.DIRECTORY_PICTURES)
                      .getAbsolutePath()
                      + File.separator + "IMG_" + timeStamp + ".png");
  
              try {
                  FileOutputStream fos = new FileOutputStream(
                          pictureFile);
                  bm.compress(Bitmap.CompressFormat.JPEG, 100, fos);
  
                  fos.close();
               //   String filePath = pictureFile.getAbsolutePath();
                  imageUri = Uri.fromFile(pictureFile);
  
  
              } catch (FileNotFoundException e) {
  
              } catch (IOException e) {
  
              }
          } else {
              Bitmap photo = (Bitmap) data.getExtras().get("data");
              productImageImgView.setImageBitmap(photo);
              productImageImgView.setVisibility(View.VISIBLE);
              imageUri = data.getData();
  
  
          }
      }
  </code></pre>
  
  <p>after saving image loses quality. i want to save Bitmap image with high quality or save image after improving quality.i need  advice about this topic</p>