iphone - How to store image in big size in local? -


i storing image locally image store in small size. want store image in orignal size how can ?

my code store image ..

nsstring *myurl = [[nsstring alloc]init]; myurl =[data valueforkey:@"large_image"];  nsdata *mydata = [[[nsdata alloc] initwithcontentsofurl:[nsurl urlwithstring:myurl]] retain]; uiimage *myimage = [[[uiimage alloc] initwithdata:mydata] retain]; nsdata *imagedata = uiimagepngrepresentation(myimage);  nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);  nsstring *documentsdirectory = [paths objectatindex:0];         // nsstring *imagename = [nsstring stringwithformat:@"image.png",documentsdirectory];     nsstring *fullpathtofile = [documentsdirectory stringbyappendingpathcomponent:imagename];         [imagedata writetofile:fullpathtofile atomically:yes]; 

this stored image enter image description here

and orignal image

enter image description here

i doing wrong in code. reason. why happend.

may because of leak ok knowledge time. :)

other wise things correct only.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -