uiimagepickercontroller

UIImagePickerController Image Orientation

有些话、适合烂在心里 提交于 2019-11-29 05:13:07
Can anyone tell me how to use the UIImagePickerController (camera and album) delegates determine the image's orientation, rotate accordingly, and assign it to a UIImageView? No, UIImagePickerController cannot do it explicitly. If you want to determine based on image's content. It is kind of hard problem. How can you determine an image's orientation without understanding the content inside of it? I can suggest you a trick that you examine the width and the length of the returned image and see if it is portrait or landscape. For rotating the image, there are some libraries and codes outside but

How to upload image that was taken from UIImagePickerController

◇◆丶佛笑我妖孽 提交于 2019-11-29 04:47:01
After user choose image from the iPhone library with UIImagePickerController , I want to upload it to my server using ASIHTTPRequest library. I know that with ASIHTTPRequest I can upload a file with the file's URl, but how do I get the image URL? I know I can get the image UIImagePickerControllerReferenceURL , that look like this: "assets-library://asset/asset.JPG?id=F2829B2E-6C6B-4569-932E-7DB03FBF7763&ext=JPG" is this the URL I need to use? There are two ways 1: You can upload the image using the imagePickerController delegate - (void)imagePickerController:(UIImagePickerController *)picker

How can you enable the iOS 6.0 panorama camera within an application?

99封情书 提交于 2019-11-29 04:01:54
问题 I'm working on an app for iOS 6 that utilizes the camera, but I've been unable to figure out how to enable the options which would allow the user to take a panoramic shot. I've got everything working as far as taking a normal photo goes, but would like to give the user the option to use the new panorama feature in iOS 6 in the app. I've scoured the net and not been able to find any information (SO, Apple Dev Center, etc). I'm unable to determine whether this is even a possibility or not. Can

How to select image from photo library and show the system camera interface within the app?

为君一笑 提交于 2019-11-29 02:29:29
How can I let a user select a photo from the Apple Photos library? How do we show the system camera UI to allow the user to take a picture? EDIT: March 15, 2016 - Here is a swift version of my prior answer, if you're looking for the objective-c version you'll find it below. -- SWIFT -- First conform to the UIImagePickerControllerDelegate protocol and the UINavigationControllerDelegate protocol class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate launch the image picker func actionLaunchCamera() { if UIImagePickerController

UIImageWriteToSavedPhotosAlbum working… sometimes

南笙酒味 提交于 2019-11-29 00:41:19
UIImageWriteToSavedPhotosAlbum is only working sometimes. Sometimes it works, sometimes it doesn't, exact same function. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { NSLog(@"Saving image to camera roll..."); UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); NSLog(@"Done!"); } I am using a UIImagePicker controller to get the image that then calls that function. Sometimes it saves it to the camera roll, other times it simply doesn't. Anyone has any idea? Thanks in advance. Edit: The completion

When should I use UIImagePickerControllerSourceTypePhotoLibrary instead of UIImagePickerControllerSourceTypeSavedPhotosAlbum?

牧云@^-^@ 提交于 2019-11-29 00:21:45
问题 I have an application that allows the user to pick a photo from their device. To do this, I'm using the UIImagePickerController, but the problem is that I'm unsure whether I should be using a source type of UIImagePickerControllerSourceTypePhotoLibrary or UIImagePickerControllerSourceTypeSavedPhotosAlbum . On my iPhone 4 running iOS 5 the saved photos album gives a much better experience, but when I try to use my iPod Touch running iOS 4.3 using a photo that I synced from iTunes, it doesn't

How do I make an exact copy of a UIImage returned from a UIImagePickerController?

我们两清 提交于 2019-11-29 00:10:28
I have divergent needs for the image returned from the iPhone camera. My app scales the image down for upload and display and, recently, I added the ability to save the image to the Photos app. At first I was assigning the returned value to two separate variables, but it turned out that they were sharing the same object, so I was getting two scaled-down images instead of having one at full scale. After figuring out that you can't do UIImage *copyImage = [myImage copy]; , I made a copy using imageWithCGImage , per below. Unfortunately, this doesn't work because the copy (here croppedImage )

iOS 7 status bar overlaps camera controls on UIImagePickerController

穿精又带淫゛_ 提交于 2019-11-28 21:59:25
I've tried setting the Info.plist 'View controller-based status bar appearance' to NO, I've tried calling [[UIApplication sharedApplication] setStatusBarHidden:YES]; I've tried -(BOOL)prefersStatusBarHidden{ return YES; } I've tried launching the picker with [self presentViewController:picker animated:NO completion:^{ [[UIApplication sharedApplication] setStatusBarHidden:YES]; } And still, there is a status bar overlapping the camera controls. It's only there in iOS 7 though. The status bar doesn't show up any where else in the app. I feel like I'm missing an important piece of the puzzle here

UIImagePickerController does not work correct on ios 9.3 iPad 4

此生再无相见时 提交于 2019-11-28 20:31:06
问题 After update ipad to ios 9.3 images are stop to display. What can be wrong with it? On iOS 9 and iOS 9.2 that was work as well. On other devices iPhone devices all work fine. private func presentPickerForLibrary() { let imagePicker = UIImagePickerController() imagePicker.allowsEditing = false imagePicker.sourceType = .PhotoLibrary imagePicker.delegate = self presentViewController(imagePicker, animated: true, completion: nil) } 回答1: Seems to be linked to iCloud Photo Library setting. Turning

UIImagePickerController crash only on iOS 7 - iPad

巧了我就是萌 提交于 2019-11-28 18:52:43
I'm getting hundreds of crashes from one of my live apps ever since people started upgrading to iOS 7. Has anyone else seen this problem? Nothing reproduces on my iPad 3 with iOS 7... Link to Crashlytics: crashes.to/s/edf2e71d9a5 Fatal Exception CALayerInvalidGeometry CALayer position contains NaN: [nan nan] 0 ... CoreFoundation __exceptionPreprocess + 130 2 CoreFoundation -[NSException initWithCoder:] 3 QuartzCore CA::Layer::set_position(CA::Vec2<double> const&, bool) + 242 4 QuartzCore -[CALayer setPosition:] + 54 5 QuartzCore -[CALayer setFrame:] + 594 6 UIKit -[UIView(Geometry) setFrame:]