title: UIImageView not showing transparency of PNG Images from UIImagePickerController
body: <p>I surely hope I am missing something because I do not understand why this is working the way it does.  I have a PNG Image, which has a fully transparent background because I want to overlay it on other images inside a <code>UIImageView</code>.</p>
  
  <p>PNG images included in the XCode project all work fine as they should.  The problem is when I select these same PNG images on the fly using <code>UIImagePickerController</code> and then assigning it to the <code>UIImageView</code>, for some really bizarre reason, it is not respecting it as a PNG Image with transparency and instead it adding a white background.</p>
  
  <p>Anyone seen this before and how do I get around this?</p>
  
  <p><strong>* UPDATE #1:</strong> I decided to try something that seems to confirm my theory.  I decided to email myself the original PNG images I saved to my device and lo and behold, the images came to me as JPG.  Seems to me that when you save an image to Photos on iPhone it converts it to JPG, this is rather shocking to me. Hope someone has a way around this.  The original images <code>testImage1.png</code> and <code>testImage2.png</code> saved to Photos and then emailed back to myself, returned as <code>IMG_XXXX.jpg</code> and <code>IMG_XXXX.jpg</code></p>
  
  <p><strong>* UPDATE #2:</strong> I kept playing around we this more and found out a few things and in the process was able to answer my own question.  (1) My theory in UPDATE #1 is partially correct, but the conversion does not happen when saving the Photo, seems like it is on the fly.  Internally photos stores the original image extension (2) I was able to validate this when I realized in my <code>UIImagePickerControllerDelegate</code> that I was using </p>
  
  <pre><code>let imageData = UIImageJPEGRepresentation(image, 1.0)
  </code></pre>
  
  <p>instead of this</p>
  
  <pre><code>let imageData = UIImagePNGRepresentation(image)
  </code></pre>
  
  <p>When I used the second line of code, it was recognizing the original transparency properties for the image.</p>