Saurabh
Saurabh

Reputation: 433

How to access image from Asset URL in iPhone?

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

Answers (1)

TheTiger
TheTiger

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

Related Questions