I have a camera application in which when I click on the camera button the camera opens and user can take picture from camera or from photo-library.
I have done the came
If you are using the UIImagePickerController
, you can get the image in its imagePickerController:didFinishPickingMediaWithInfo:
delegate method. The image you get is an UIImage
object.
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
NSData *data = UIImageJPEGRepresentation(image, 1.0);
Now NSData
has a method bytes
which returns void*
. This will point to a C type array which should play well with SQLite.