uiimagepickercontroller

ALAssetsLibrary to get image from the custom album ios

。_饼干妹妹 提交于 2019-12-11 15:24:42
问题 I am using ALAssetsLibrary to save the image in customs Album in app. i am able to save the image but not able to get the image from the Album __weak ALAssetsLibrary *lib = self.library; [self.library addAssetsGroupAlbumWithName:@"MyAlbum" resultBlock:^(ALAssetsGroup *group) { ///checks if group previously created if(group == nil){ //enumerate albums [lib enumerateGroupsWithTypes:ALAssetsGroupAlbum usingBlock:^(ALAssetsGroup *g, BOOL *stop) { //if the album is equal to our album if ([[g

Iphone get photo resolution programmatically

删除回忆录丶 提交于 2019-12-11 14:03:18
问题 There's a way to get programmatically the dimensions of a photo taken with an iphone? I want to take the dimensions directly without passing throught model version,so this solution can't be valid: check model version->write a dictionary with dimensions of each iphone model -> take the correct index 回答1: When you take a picture, you get an UIImage. UIImage objects have a -(CGSize)size method that returns the dimensions of the image in points. You should multiply it by it's scale property to

How to crop the captured image before saving it in gallery in IOS [duplicate]

天大地大妈咪最大 提交于 2019-12-11 14:02:27
问题 This question already has answers here : Cropping an UIImage (24 answers) Closed 6 years ago . I am working on camera app. I am capturing an image by using UIImagePickerController.After that before saving it in gallery I want to crop the image and need to save the cropped image in gallery. I searched on google ,I found samples to pick the images from gallery and then cropping which is not my requirement.Could any body have worked on this??? If you have gone through any tutorials/sample code

iOS7 UIImagePickerController cancel button disappear

夙愿已清 提交于 2019-12-11 13:12:57
问题 The Cancel button is miss?! How can I fix this? Thank you very much. if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { if(buttonIndex == 1) { self.ctr = [[UIImagePickerController alloc] init]; self.ctr.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; self.ctr.delegate = self; self.ctr.allowsEditing = YES; [self presentModalViewController:self.ctr animated:YES]; } } 回答1: Just change the UIImagePickerController navigationBar

iPhone: taking a picture programmatically

爷,独闯天下 提交于 2019-12-11 12:39:28
问题 I'm trying to use the UIImagePickerController interface from OS 3.1, with the cameraOverlayView and takePicture, but I've clearly failed to understand how this works, and so I'm not getting the behaviour I want. What I want to do is open the camera and take a picture automatically without having to having the user interact with the picker or edit the image. So I subclass UIImagePickerController (similar to the example in http://github.com/pmark/Helpful-iPhone-Utilities/tree/master/BTL

How to give Title in UIImagePickerController?

烈酒焚心 提交于 2019-12-11 12:15:40
问题 I want to give title in UIImagePickerController as shown in image screen shot 回答1: Set UIImagePickerController delegate to self and implement the following method of UINavigationControllerDelegate : - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [viewController.navigationItem setTitle:@"<Your-Title>"]; } 回答2: You try this code: - (void)navigationController:(UINavigationController *

UIImagePickerController doesn't delete temp video capture file from /tmp/capture

岁酱吖の 提交于 2019-12-11 12:08:40
问题 My app is recording videos using a UIImagePickerController and saves it to the camera roll just fine but my problem is that the recorded video is also being saved in the /tmp/capture directory and doesn't get deleted. My app slowly accumulates a long list of videos stored in the tmp/capture directory using lots of unnecessary data because of this. I am using ARC and iOS7 SDK. -(BOOL)startCameraControllerFromViewController:(UIViewController*)controller usingDelegate:(id )delegate forType: (int

UIImagePickerController: Check if returned image is in landscape or portrait? [duplicate]

人走茶凉 提交于 2019-12-11 11:44:38
问题 This question already has answers here : How to know if photo in Landscape or Portrait mode? (2 answers) Closed 6 years ago . So, the UIImagePickerController does not support landscape orientation. However, there is a portion of application where it is essential that the image that comes from the controller is recognized to be either in a portrait or landscape format. I can handle this so far when importing an image from my library using the UIImagePickerController. I just compare the UIImage

iPhone UIImagePickerController file name

爱⌒轻易说出口 提交于 2019-12-11 11:25:50
问题 after getting a selected image in didFinishPickingImage: , is there a way to get the filename or name of that image? Is there any string that uniquely identifies that image or that is saved with the image at the moment image was added to the photo album? 回答1: You can check the metadata, but from my tests the title does not seem to be there or anywhere else. 来源: https://stackoverflow.com/questions/3808082/iphone-uiimagepickercontroller-file-name

iOS wrong orientation when using front camera on UIImagePickerController

自古美人都是妖i 提交于 2019-12-11 11:03:21
问题 I'm using UIImagePickerController to snap an image and uploading it to server. When taking a photo in the front camera, the height/width get reversed somewhere. The image is displayed correctly later, but height and width are reversed (and I'm using them for the UIImageView autolayout constraint) The thing is - that when looking at UIImagePickerControllerMediaMetadata of front and back camera images - the EXIF and the rest of the metadata is the same (resolution is smaller but the height