title: Android: Taking picture with low quality
body: <p>I created a project that allow user to take a picture and view it. I have no face any issue while taking, view, save and retrieve the photo. But my problem is the image that camera took is in bad quality, I don't know how to set the quality of the camera <code>Intent</code>. Here is my code looks like.</p>
  
  <pre><code>....
  Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
          startActivityForResult(cameraIntent, CAMERA_REQUEST);
  ....
  
   @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          if (requestCode == CAMERA_REQUEST &amp;&amp; resultCode == RESULT_OK) {
              Bitmap userPhoto = (Bitmap) data.getExtras().get("data");
              iv_user.setImageBitmap(userPhoto);
          }
      }
  </code></pre>
  
  <p>Here is a screenshot of while camera is on.</p>
  
  <p><a href="https://i.stack.imgur.com/1r1D3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1r1D3.jpg" alt="enter image description here"></a></p>
  
  <p>And here is in preview camera mode after the image is captured.</p>
  
  <p><a href="https://i.stack.imgur.com/Rd40s.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rd40s.jpg" alt="enter image description here"></a></p>
  
  <p>If we compare these two photos, we can see the image in preview mode is blur.</p>