title: Loosing image quality while using bitmap and camera api
body: <p>While I am using a camera it returs low quality image. In ImageView I can see a good quality, but I don't know why it returns a bad quality.
  <br> This is a piece of by code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private static final int CAM_REQUEST =2 ;
      Button button;
      ImageView imageView;
      Paint mPaint;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
           mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
  
          button=(Button)findViewById(R.id.btcam);
          imageView=(ImageView)findViewById(R.id.img);
  
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  Intent camera_intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                      if(camera_intent.resolveActivity(getPackageManager())!=null)
                      {
                          startActivityForResult(camera_intent,CAM_REQUEST);
                      }
  
              }
          });
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
  
  
          if(requestCode==CAM_REQUEST &amp;&amp; resultCode==RESULT_OK)
          {
              Bundle extras =data.getExtras();
              Bitmap imagebitmap=(Bitmap)extras.get("data");
              imageView.setImageBitmap(imagebitmap);
          }
  
  
      }
  }
  </code></pre>
  
  <p>Thank you for help</p>