title: How to reduce size of the picture taken by camera in iphone 7
body: <p>I am working on xamarin ios. I have to implement camera functionality in iphone app. I have implemted the code. But the problem is that when I try to upload the picture with webservices, it doesn't upload due to size of the image. </p>
  
  <p>So I tried to scale the size of picture but in that case the image is looking strethced. I want that image should be uploaded with same size, may be with worst quality but height and width should be original.</p>
  
  <p>Here is the code I implemented:</p>
  
  <pre><code>Camera.TakePicture(this, (obj) =&gt;
              {
                  var photo = obj.ValueForKey(new NSString("UIImagePickerControllerOriginalImage")) as UIImage;
                  var image = photo.Scale(new CGSize(1280, 720));
                  Byte[] myByteArray;
                  using (NSData imageData = image.AsJPEG(0.0f))
                  {
  
                      myByteArray = new Byte[imageData.Length];
                      System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, myByteArray, 0, Convert.ToInt32(imageData.Length));
                  }
  
              }); 
  </code></pre>