1

After picking an image from UIImagePickerController, I am trying to pass that imageView as a source to QuickLook preview which requires URL as a data source. I am not interested to write the image into any document storage to create a URL, which will create a copy image again in the disk.

Note: I am using a scanner SDK where it will return a UIImage as a result, so i need to use that UIImage for QuickLook preview.

Any suggestion to achieve this?

Mukesh
  • 515
  • 7
  • 21
  • I had a quick look at the API and it appears that the delegate call back gives you a user info dictionary containing URLs you can pass to the preview. Post your code if you want more detailed help. – drekka Aug 06 '19 at 06:00

1 Answers1

2

You might want to checkout this method (https://developer.apple.com/documentation/uikit/uiimagepickercontrollerdelegate/1619126-imagepickercontroller). One of the arguments to this method is an 'info' dictionary which can be used to get the image URL. Use the key 'imageURL'.

  • +1 for this, when we are trying to pick an image from photos. But i have scanner SDK it will give UIImage as a result, so am trying to see possibility of sending UIImage as datasource to QuickLook. – Mukesh Aug 06 '19 at 09:47
  • AFAIK, as long as the image is not stored somewhere, either locally or in a remote repo, you can't get a URL for it. If you figure out how to do it, please let me know – Akshaykalbhor Aug 08 '19 at 10:04