title: When should I use UIImageJPEGRepresentation and UIImagePNGRepresentation for uploading different image formats to the server?
body: <p>In my application I have to send images of  different formats to the server (it must be all file formats that can be read by the <code>UIImage</code> class) <a href="https://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html" rel="noreferrer">https://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html</a>
  <p>And the problem is: I don't know when I should use each of this methods. Of course it's obvious that for <code>.png</code> images I need to use <code>UIImagePNGRepresentation</code> and for <code>.jpg/.jpeg</code> <code>UIImageJPEGRepresentation</code>. But what about other formats (<code>.tiff</code>,<code>.gif</code> , etc.)? There are only two methods for image manipulations and so many formats.</p>