title: How to get image from UIImagePickerController and Pass to next VC
body: <p>I select a photo from PhotoLibrary and How can I achieve below tasks</p>
  
  <p>In this case, I am using Swift. I need to reconstruct the image in the next VC either thru :<br/>
  a) Bytes<br/>
  b) Image<br/></p>
  
  <p>by means of using Segue or user class.  If the Image file is huge , it is better pass by segue or class.<br/></p>
  
  <p>1) Get the Image or Bytes from the UIImagePickerController </p>
  
  <p>2) How to pass the Image Bytes to next next VC<br/>
     use Segue <br/>
     or use class<br/>
     Do I use user class to store the Image or Bytes?</p>
  
  <p>3) How to get the Height and Width so that I can know if the image is in portrait or landscape mode.<br/><br/></p>
  
  <p>4) How to check if there is image in ImageView? <br/></p>
  
  <p>I have a btn to click to check before navigating to next VC
  <br/><br/></p>
  
  <p>Your help is greatly appreciated</p>
  
  <p>Below is code I used:</p>
  
  <pre>
     @IBOutlet var imageView: UIImageView!
  
  let imagePicker = UIImagePickerController()
  
   @IBAction func loadImageButtonTapped(sender: UIButton) {
     imagePicker.allowsEditing = false
     imagePicker.sourceType = .PhotoLibrary
  
    presentViewController(imagePicker, animated: true, completion: nil)
  }
  
  
  //-- - UIImagePickerControllerDelegate Methods
  
  func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
  
  if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
     imageView.contentMode = .ScaleAspectFit
     imageView.image = pickedImage
    }
  
    dismissViewControllerAnimated(true, completion: nil)
  }
  
  </pre>