title: Android: Customize photo size
body: <p>I have one application in which mobile capture photo then it upload to the server. I want to check the size of photo first then reduce photo size to some particular size depending on actual photo size. Actually on server it not allow photo which have greater than some particular size (say 200 kb). </p>
  
  <p>Or can I restrict the camera to capture photo only in particular size even some one change the setting of camera.</p>
  
  <p>lot of question ask here which retrieve width and height of the photo. But I want to customize size in byte.</p>
  
  <p>To open the camera I an using cameraIntent</p>
  
  <pre><code>Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  startActivityForResult(cameraIntent, CAMERA_REQUEST);
  </code></pre>