I have been reading different answers but havent been able to fix this problem:
On my iPad app, landscape mode, I have a UIImagePickerController to take a picture this picker gets shown inside a UIPopoverController.
The problem is that the image size on the preview and after taking the pic are different
Preview:
.
After taking the image:
here my code for setting the picker and popOver:
BOOL hasCamera = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = hasCamera ? UIImagePickerControllerSourceTypeCamera : UIImagePickerControllerSourceTypePhotoLibrary;
picker.modalPresentationStyle = UIModalPresentationFullScreen;
picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
[picker setShowsCameraControls:FALSE];
self.companyPopOverController = [[[UIPopoverController alloc] initWithContentViewController:picker] autorelease];
self.companyPopOverController.passthroughViews=[NSArray arrayWithObject:self.view];
[self.companyPopOverController presentPopoverFromRect:CGRectMake(622, 534, 10, 10) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
and to show the taken pic:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image=[info objectForKey:UIImagePickerControllerOriginalImage];
[self.picImage setImage:image];
[self.companyPopOverController dismissPopoverAnimated:YES];
self.imageTaken = YES;
}
So how can I make my preview image with the same size as the actual image taken?
thanks!