I am using ELCImagePickerController in my app and I don't want to save the selected fullScreenImage to my array because if i selected 40 iPad images then that is not good.
I want to get data from UIImagePickerControllerReferenceURL
instead of UIImagePickerControllerOriginalImage
from the dict of method - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info
.
I have tried:
NSDictionary *dict = [info objectAtIndex:count];
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[dict objectForKey:@"UIImagePickerControllerReferenceURL"]]]];//UIImagePNGRepresentation([UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@",[dict objectForKey:@"UIImagePickerControllerReferenceURL"]]] );
NSLog(@"length %d",[data length]);
imageview.image = [UIImage imageWithData:data];
However, every time I am getting 0 bytes. I have tried with all the answers available in forum but no use.
Can anyone answer this please?
See Question&Answers more detail:os