title: Swift 4, iOS - save / load image to device Photos Album (Camera Roll) without compression or unmodified?
body: <h2>The problem</h2>
  
  <p>I'm working on an app that modifies image bits (precisely adds some data). <strong>I would like to save modified image to device photo album (camera roll) and then loaded it from there for further modifications</strong>. </p>
  
  <p>I implemented functions for saving and loading image from device Photos working fine <strong>but I think that saving or loading images from Camera Roll modifies or compresses my images so my app can't decode previously done bits modifications</strong>. </p>
  
  <hr>
  
  <h2>What I have tried</h2>
  
  <p>I'm sure my app's image modification functions are working fine - I tested them on images saved and loaded with FileManager.</p>
  
  <p>Functions I used for saving and loading images from Camera Roll:</p>
  
  <p>Saving image:</p>
  
  <pre><code>   func saveImageToCameraRoll(image: UIImage) {
          PHPhotoLibrary.shared().performChanges({
              PHAssetChangeRequest.creationRequestForAsset(from: image)
          }, completionHandler: { success, error in
              if success {
                  print("save success")
              }
              else if let error = error {
                  print("save error \(error)")
              }
              else {
                  print("save ok")
              }
          })
      }
  </code></pre>
  
  <p>Loading image is done with imagePicker:</p>
  
  <pre><code>let imagePicker = UIImagePickerController()
  @IBOutlet weak var imageView: UIImageView!
  @IBAction func loadImageBtnTapped(_ sender: Any) {
      imagePicker.allowsEditing = false
      imagePicker.sourceType = .photoLibrary
      present(imagePicker, animated: true, completion: nil)
  }
  
  func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
      if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
          imageView.contentMode = .scaleAspectFit
          imageView.image = pickedImage
      }
      dismiss(animated: true, completion: nil)
  }
  </code></pre>
  
  <p>Both work fine: saved image is visible in device Photos, when loaded image appears in my app's imageView. But as I explained above, image is somehow modified so the bits representation is different than before.</p>
  
  <hr>
  
  <h2>Question</h2>
  
  <p>So the questions are: </p>
  
  <ul>
  <li><p><strong>is it possible to save or load uncompressed or unmodified image from device Camera Roll?</strong></p></li>
  <li><p>or is it possible to chose image compression for saving to Camera Roll (i.e. PNG or TIFF) that will not modify my image bits?</p></li>
  </ul>
  
  <p>I'm currently on Swift 4, but can easily update to 4.2.</p>
  
  <p>Any help will be much appreciated..</p>