title: Converting UIImage to Stream
body: <p>i am using buddy sdk</p>
  
  <p>this sample tells me how to add profile picture, i try with every way but when i try to use this code</p>
  
  <pre><code>client.CreateUserAsync("username","password").ContinueWith(r =&gt; { var user = r.Result;
  
  // upload a profile photo
  Stream photoStream = GetSomePhoto();
  user.AddProfilePhotoAsync(photoStream);
  });
  </code></pre>
  
  <p>This is my Code, but it gives me over array problem</p>
  
  <pre><code>    var img = loginImagePicker.Image.AsPNG().AsStream(); 
      var hu = await user.AddProfilePhotoAsync(img);
  </code></pre>
  
  <p>this is the problem</p>
  
  <p><img src="https://i.stack.imgur.com/Lb4CA.png" alt="enter image description here"></p>
  
  <p>any advice?</p>