uiimagepickercontroller

Grabbing the first frame of a video from UIImagePickerController?

给你一囗甜甜゛ 提交于 2019-12-02 18:25:55
I'm trying to get the first frame from the selected video in a UIImagePickerController to show in a UIImageView , but I do not know if it's possible. If it is, how would I do it? memmons You can do this in one of two ways. The first way is to use the MPMoviePlayerController to grab the thumbnail: MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL]; moviePlayer.shouldAutoplay = NO; UIImage *thumbnail = [moviePlayer thumbnailImageAtTime:time timeOption:MPMovieTimeOptionNearestKeyFrame]; This works, but MPMoviePlayerController is not a particularly

UIImagePickerController on iPad with IOS9

人走茶凉 提交于 2019-12-02 17:57:53
Since iOS 9 and Xcode 7 I am no longer able to implemet a UIImagePickerController on an iPad (both device and simulator). The code below works on the iPad but only prior to iOS 9. When using iOS 9+ the presented image (after the UIImagePickerController is dismissed) is an incorrect version of the selected image. Without re-sizing or cropping the final image is only the top right corner of the original image ?? Plus another problem - If imagePicker.allowsEditing = false, you are unable to select images from the PhotoLibrary ?? @IBAction func photoButton(sender: AnyObject) { imagePicker

UIImagePickerController when dismissed pushes view to 20 px up in iOS 6.0 only

六眼飞鱼酱① 提交于 2019-12-02 16:28:56
问题 EDIT : I am using UIStoryBoard . I have presented like this: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; //| UIImagePickerControllerSourceTypeSavedPhotosAlbum ; imagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage,nil]; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { if ([[UIDevice

UIImagePickerController editing allowed locks UIImage to max size of 320x320

雨燕双飞 提交于 2019-12-02 15:19:34
Update: With iPhone OS 3.0+, the whole UIImagePickerController API has changed. This question and answer should be considered 2.2. legacy code. When using the UIImagePickerController and you allow editing of the image. The iPhone allows the user to resize and pan the image. However, the max size of an edited image is capped at 320x320. As an example, I took an iPhone screenshot and placed it in the photo library, which is a 480x320 png. When I use a UIImagePickerController to select that image, even if I do NOT scale or pan the image, it is cropped to 320x320 before it is returned from the

iPhone custom camera overlay (plus image processing) : how-to [duplicate]

好久不见. 提交于 2019-12-02 14:58:43
Possible Duplicate: How do you create a custom camera view, instead of UIImagePickerViewController? Many image sharing apps available today from the App Store use a custom camera instead of the standard camera picker provided by Apple. Does anyone know any tutorials or tips for creating a custom camera? Yes, create a UIImagePickerController from code, adjust its properties, add an overlay onto it, and with you controller, control whatever you want on that overlay : custom controls, overlaying images, etc... That gives something like this : self.picker = [[UIImagePickerController alloc] init];

Do you have any methods for going from CameraRoll to a new view controller?

扶醉桌前 提交于 2019-12-02 14:37:55
问题 I'm trying to go from Camera Roll to a new view controller. So basically I want to be able to choose a picture and after choosing the picture, it will be displayed on an imageView on a new view controller? Is that hard to make ? -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info{ self.chosenImage = info[UIImagePickerControllerOriginalImage]; [self.imageView setImage:self.chosenImage]; [self dismissViewControllerAnimated:YES

Crash when pushing to another controller after `didFinishPickingMediaWithInfo`

蓝咒 提交于 2019-12-02 12:46:23
I'm trying to have the app go to a different view controller after the user chooses a photo from the picker. func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { if let image = info[UIImagePickerControllerEditedImage] as? UIImage { let previewController = self.storyboard?.instantiateViewController(withIdentifier: "previewVC") as! PreviewViewController previewController.previewImage.image = image previewController.navigationItem.setHidesBackButton(true, animated: false) self.navigationController?.pushViewController(previewController

how to create a pdf from image which taken by camera with pdfkit

戏子无情 提交于 2019-12-02 11:54:36
Hi I am new to pdfkit and iOS applications, I want to take a picture with device and then convert the image to pdf. taking pictures with camera and saving it on Camera Roll works completely fine, the problem is when I want to create pdf from that image it needs the name of the image, how I can find it? and another question is it possible to implement any pdf editor with pdfkit to edit image? Appreciate any help. below is my imagePickerController codes. func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { let pickedImage = info

Problem opening new ViewController after UIImagePickerController

一笑奈何 提交于 2019-12-02 10:38:05
问题 I am trying to open up a new view (UnprocessedPhotoViewController) immediately after the delegate function for my UIImagePickerController returns a "didFinishPickingImage". Unfortunately, it appears that I can either open the UIImagePickerController modal view, or switch to the UnprocessedPhotoViewController as a modal, but not both sequentially. In the code below, a button press activates the pickPhoto IBAction. This code activates the UIImagePickerController successfully. After the user

UIImageView does not show Image from UIImagePickerController

风格不统一 提交于 2019-12-02 10:04:45
I am trying to take a picture with my app and then show it in a UIImageView that is predefined in my .xib. I have a IBOutlet UIImageView *_foto that is linked to the UIImageView in the .xib When I do the following the picture doesnt show in the UIImageView after taking a picture: - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { _foto.image = image; //Also tried set image, and resizing the image first [self dismissModalViewControllerAnimated:YES]; } Now, when I add code to create a new image view