I am getting asset URL from NSURL* localUrl = (NSURL *)[info valueForKey:UIImagePickerControllerReferenceURL];
and I saved it in a local database. And at the time of retrieving I have got an string and I have convert it into NSURL through NSURL *url1 = [NSURL URLWithString:image_path];
but when I get NSData from this URL through NSData *myData = [NSData dataWithContentsOfURL:url1];
it return NULL. Can anyone help me to get NSData and convert it into image.
Asked
Active
Viewed 1.3k times
0
1 Answers
1
You can not convert it direct. You will have to use ALAsset Block
. Here is the complete description for same thing.
-
Thanks for you reply. But I am still getting error this [__NSCFConstantString isFileURL]: unrecognized selector sent to instance 0x3ac5c . The URL of my image is assets-library://asset/asset.JPG?id=83CAC75D-FF0F-44D6-B45C-85BABF32E71B&ext=JPG . – Saurabh Sep 19 '12 at 07:25