iphone - How to get saved image file path in iOS -


hi developing app in there option pick photos ios photo gallery. have upload selected photos server. upload images using kaltura sdk in situation not able directly send uiimage server. need send saved image file path.

for found solution, saving selected photos in particular file path use file path. problem not wish save photos again in phone memory because photos stored in particular path.

so there other option retrive saved image file path without saving again?

try one:

- (void)saveimage: (uiimage*)image {     if (image != nil)     {         nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory,                                                          nsuserdomainmask, yes);         nsstring *documentsdirectory = [paths objectatindex:0];         nsstring* path = [documentsdirectory stringbyappendingpathcomponent:                       @"test.png" ];         nsdata* data = uiimagepngrepresentation(image);         [data writetofile:path atomically:yes];     }  }  - (uiimage*)loadimage {     nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory,                                                      nsuserdomainmask, yes);     nsstring *documentsdirectory = [paths objectatindex:0];     nsstring* path = [documentsdirectory stringbyappendingpathcomponent:                   @"test.png" ];     uiimage* image = [uiimage imagewithcontentsoffile:path];     [self sendaction:path];     return image; } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -