title: Taking square photo with react native camera
body: <p>By default the <code>react-native-camera</code> takes photos in standard aspect ratio of the phone and outputs them in <strong>Base64 png</strong>, if the <code>Camera.constants.CaptureTarget.memory</code> target is set. </p>
  
  <p>I am looking for a way to create <strong>square</strong> photos - either directly using the camera, or by converting the captured <code>imagedata</code>. Not sure if something like that is possible with React Native, or I should go entirely for native code instead.</p>
  
  <p>The <code>aspect</code> prop changes only how the camera image is displayed in the viewfinder.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;Camera
    ref={(cam) =&gt; {
      this.cam = cam;
    }}
    captureAudio={false}
    captureTarget={Camera.constants.CaptureTarget.memory}
    aspect={Camera.constants.Aspect.fill}&gt;
  &lt;/Camera&gt;;
  
  async takePicture() {
    var imagedata;
    try {
      var imagedata = await this.cam.capture();// Base64 png, not square
    } catch (err) {
      throw err;
    }
    return imagedata;
  }
  </code></pre>