Search code examples
iphoneobjective-ciosios5ios4

How to get URL from UIImage


How can I get an URL from UIImage? I've got an image from iPhone library and I resize it and I don't want to save the new image but I want to get it's URL.


Solution

  • UIImage has no URL or file information. It's just a collection of bytes representing the pixel color data. If you get the UIImage from a UIImagePicker then you can get the URL to the original image in the asset library. But you must get this URL in the image picker delegate method and you must keep track of it separately from the UIImage object.

    Edit - based on the OP's comment, this is not the information being requested.