title: ANDROID CROP: Crop with square shape
body: <p>I'm trying to crop in a square shape the pictures from Gallery and from the Camera. From the gallery works perfect, the gallery opens, I choose the picture and then the crop frame keeps always the shape of a square even when I resize it. But when I do the same for a picture that I take from the camera, the crop frame keeps the rectangular shape no matter what I change in the code.</p>
  
  <p>I read that this can be changed with the <code>aspectX</code> and <code>aspectY</code> but I still get the same results.
  Currently my code is the following:</p>
  
  <pre><code>Intent i = new Intent("android.media.action.IMAGE_CAPTURE");
              File f = new File(Environment.getExternalStorageDirectory(),  "photo.png");
              i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
              i.putExtra("crop", "true");
              i.putExtra("outputX", 320);
              i.putExtra("outputY", 320);
              i.putExtra("aspectX", 320);
              i.putExtra("aspectY", 320);
              i.putExtra("scale", true);      
  
              mUri = Uri.fromFile(f);
              startActivityForResult(i, CAMERA_PICTURE);
  </code></pre>
  
  <p>Does any body have a way to configure the crop frame to always keep the square shape?...
  Thanks in advance!</p>