Problem with use of Image pciking with UIImagePickerControl
Hello Can anyone help me ?
I am picking an image with a UIImagePickerControl with the code
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
if((UIButton *) sender == choosePhoto) {
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
}
else {
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}
I need to pas this image data to next view
i got the code for taking image data representation
UIImage *img = [UIImage imageNamed:@"some.png"];
NSData *dataObj = UIImageJPEGRepresentation(img, 1.0);
how can I get the image representation of same image that i am taking with UIImagePickerControl
Can u pls send me the code to use that image ?
|