title: Send the captured jpg image to server without compression in ios swift
body: <p>This is very basic requirement but did not get any result after research. In Swift 3.0, by using below API, we have saved captured image.</p>
  
  <pre><code>UIImageWriteToSavedPhotosAlbum
  </code></pre>
  
  <p><code>UIImage</code> object have the image. Basic way to send image to server is convert the <code>UIImage</code> to NSData. To perform this below two API are available.</p>
  
  <pre><code>UIImageJPEGRepresentation //NOTE - We must specify the compression parameter.
  UIImagePNGRepresentation // We don't need to specify the compression parameter.
  </code></pre>
  
  <p>By default, image saved is in <strong>JPEG</strong> format, we want to send <strong>SAME</strong> image to server <strong>WITHOUT</strong> any compression.</p>
  
  <p>So size of jpeg image in album and size of image on server must be exactly same.</p>
  
  <p>How do I achieve this ?</p>
  
  <p>Thank you for help.</p>