why don't you capture image with 8MP camera and then before saving image change its size w.r.t 5MP resolution using following method
+ (UIImage*)imageWithImage:(UIImage*)image
scaledToSize:(CGSize)newSize
{
UIGraphicsBeginImageContext( newSize );
[image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
call the above method in imagePickerDidFinishMediaWithInfoMethod before saving the captured image. The above method will return you an Uiimage with changed size (that you have to provide as CGSize).
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage * tempImage =[info objectForKey:UIImagePickerControllerOriginalImage];
CGSize mSize;
mSize = CGSizeMake(your width and height as per 5MP mode);
tempImage = [ViewController imageWithImage:tempImage scaledToSize:mSize];
// use this temp img as it would be in dimensions of 5MP image.
}