ios - How to create/save high resolution image in Objective-C? -
i have following problem - have 2 high resolution images 300dpi. want create new image 2 high-res images. using following code:
i generate new image this:
nsstring *filename = @"imageone.jpeg"; nsarray *path = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentdirectory = [path objectatindex:0]; nsstring *imgpathwithfilename = [documentdirectory stringbyappendingpathcomponent:filename]; // [uiimagepngrepresentation(finalimage) writetofile:imgpathwithfilename atomically:yes]; [uiimagejpegrepresentation(imageone, 1) writetofile:imgpathwithfilename atomically:yes]; nslog (@"success!");
the problem new image 72dpi. why that, when images compose new one, 300dpi each? how create image 300dpi, ideas?
Comments
Post a Comment