Reputation: 433
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.
Upvotes: 0
Views: 12638
Reputation: 13354
You can not convert it direct. You will have to use ALAsset Block
. Here is the complete description for same thing.
display image from URL retrieved from ALAsset in iPhone
Upvotes: 1