uiimagepickercontroller

How can I tell if the image returned from didFinishPickingMediaWithInfo was from the camera or the photoalbum?

北战南征 提交于 2019-12-03 04:36:04
I have a view controller that needs to be able to choose a picture from the photo album and also from the camera. I can only have 1 delegate method for didFinishPickingMediaWithInfo and while I can tell if it's an image, I can't seem to tell if it's from the album or from the camera (and I need to save it in the album first). Is there anything in the info that can help me distinguish from the two? Thanks... camdez Because the UIImagePickerController is passed to the method, all you have to do is: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:

Optimizing iPhone photo-taking speed, UIImagePickerController

天大地大妈咪最大 提交于 2019-12-03 04:07:11
I'm using the UIImagePickerController in my app. Has anyone used any optimization tricks for picture-taking latency? I don't need to store them to the library. I simply want to capture the pixel data and destroy the image object after making a calculation. Also, is there a way to hide the lens when it loads? (Worst case, I could mask the lens on camera startup and mask the frozen image upon saving/calculating.) EDIT: I've already set showsCameraControls = NO; . This hides the lens effect between snapshots, but does not affect the presence of the lens animation on camera startup. Are you wedded

Picker Error Message on Exit (encountered while discovering extensions: Error Domain=PlugInKit Code=13) With Swift 4 - Xcode 9

痴心易碎 提交于 2019-12-03 03:49:26
问题 Similar to PhotoPicker discovery error: Error Domain=PlugInKit Code=13 and also to https://forums.developer.apple.com/thread/82105 BUT I have tried all of these suggestions and still get an error in the debug log. Running Swift 4 XCode 9A235 What was suggest at the various places was ... some people said add @objc some people said add internal some people suggested adding _ and making sure using Any and not AnyObject some people said to use didFinishPickingImageWithInfo (this returns no image

UIImagePickerController editing allowed locks UIImage to max size of 320x320

南楼画角 提交于 2019-12-03 03:13: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

Memory warning after using the UIImagePicker once

 ̄綄美尐妖づ 提交于 2019-12-03 02:08:36
I've referred to this very good reference: https://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more but I'm having some very serious issues. After I take a photo, I receive a memory warning. This is for the first photo I take, not the second or third. I was wondering if it's because I've got a couple of small jpegs loaded from the application directory into scrolling views. The only solution I can think of is to unload everything in my mainview whilst the UIImagePicker is active, and reload everything again afterwards, but I'm not sure that's the correct

Uploading Images from UIImage Picker onto new Firebase (Swift)

拈花ヽ惹草 提交于 2019-12-03 02:04:53
问题 I have a UIImagePicker set up within my app that works fine. I would like to upload a profile picture to Firebase when my UIImage picker has been chosen. Here is my function for when a picture has been selected. //image picker did finish code func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) { let chosenImage = info[UIImagePickerControllerOriginalImage] as! UIImage profilePic.contentMode = .ScaleAspectFill profilePic.image =

UIImagePickerController - crops picture to square (in portrait)

半世苍凉 提交于 2019-12-03 01:55:19
I'm using the UIImagePickerController to take and edit a picture. it works fine in landscape, but in portrait it will crop the picture into a square (does not allow to reduce the image to fit fully into the square crop field like in landscape. Any ideas? code: -(IBAction)initCamera:(id)sender{ //Init imagePicker instance UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; [imagePicker setDelegate:self]; [imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera]; [imagePicker setShowsCameraControls:YES]; [imagePicker setAllowsEditing:YES]; [self

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

南楼画角 提交于 2019-12-03 01:32:36
问题 This question already has answers here : Closed 8 years ago . 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? 回答1: Yes, create a UIImagePickerController from code, adjust its properties, add an overlay onto it, and with you controller,

ios 7 image picker inside popover wrong behavior

て烟熏妆下的殇ゞ 提交于 2019-12-02 22:11:27
My image picker view controller setted inside popover controller. On iOS 6 everything works great, but on iOS 7 the image is rotated and all movings are doing verse: when turning iPad left image is going down, when moving up image going left, etc. Here is the code for showing my camera: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; objPopView = [[UIPopoverController alloc] initWithContentViewController:imagePicker]; [objPopView presentPopoverFromRect:CGRectMake(842,

How do I reference the picture I just took in iOS?

旧时模样 提交于 2019-12-02 22:09:31
问题 I'm writing an app that allows the user to take a picture and then shows it in an image view. I get that I need to write a line of code similar to the following: _imageView.image = picker.image; , but I'm not sure what I need to substitute for picker.image . That is what I currently have and it gives me an error. Basically, what I'm asking is how do I reference the picture that was just taken? Where does this picture go (in memory?) after you take it? How can I reference it later (like for