uiimagepickercontroller

UIImageView does not show Image from UIImagePickerController

守給你的承諾、 提交于 2019-12-31 06:25:11
问题 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

ModalViewController loading on top of another Modal

六眼飞鱼酱① 提交于 2019-12-31 05:12:10
问题 There may be a better way to do this, and please direct me if there is. I'm creating an UIImagePickerController with an overlayView in viewDidAppear for 'choose from library', 'take photo', 'flash' 'camera source', etc. // Set up the camera imagePicker = [[UIImagePickerController alloc] imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.delegate = self; imagePicker.cameraOverlayView = [self cameraOverlayView]; cameraOverlayView.backgroundColor = [UIColor clearColor]

How can i add two uiimageview and save it to iphone photo gallery in iphone application development?

雨燕双飞 提交于 2019-12-30 11:30:28
问题 I am going straight to the point,my problem is, I have a uiview controller which is taking 3 buttons and a uiimage view.Now, When i am pressing first button i am taking image from iphone default photo gallery and placing on uiimageview. When i am pressing second button it will take another image from photo gallery and placing on previous image. Now when i will press third button those two image will add and make it one image and save in the photo album. i have done step 1 and step 2 but how

How can i add two uiimageview and save it to iphone photo gallery in iphone application development?

别等时光非礼了梦想. 提交于 2019-12-30 11:30:09
问题 I am going straight to the point,my problem is, I have a uiview controller which is taking 3 buttons and a uiimage view.Now, When i am pressing first button i am taking image from iphone default photo gallery and placing on uiimageview. When i am pressing second button it will take another image from photo gallery and placing on previous image. Now when i will press third button those two image will add and make it one image and save in the photo album. i have done step 1 and step 2 but how

How to save an image picked from a UIImagePickerController in Swift?

廉价感情. 提交于 2019-12-30 11:12:29
问题 I'm building an app where I let the user to pick an image from its photo library. I was using this code to save it. func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) { imgPicker.dismissViewControllerAnimated(true, completion: nil) NSUserDefaults.standardUserDefaults().setValue(image, forKey: "bgImage") } func imagePickerControllerDidCancel(picker: UIImagePickerController) { imgPicker

Present another modal view from UIImagePickerController

…衆ロ難τιáo~ 提交于 2019-12-30 06:37:22
问题 I want to add a confirmation view after the user takes a photo or selects a saved photo. The confirmation view will just show the selected image, with a cancel and upload button in a toolbar. My UIImagePickerController is presented modally from one of my view controllers, which is controlled by a navigation controller, which is in turn controlled by a tab bar controller. How do I present my confirmation view modally so that it takes up the full screen (like the image picker view) when the

UIImagePickerController delegate warning

随声附和 提交于 2019-12-30 06:02:07
问题 I've just put a photo picker into my project, and everything works fine. The only thing is it insists on giving me the following warning where I set the delegate - Assigning to 'id<UINavigationControllerDelegate,UIImagePickerDelegate>' from incompatible type 'AddTargetViewController *' I have set up the delegate in the AddTargetViewController.h in the normal way - @interface AddTargetViewController : UIViewController <UIImagePickerControllerDelegate> and I can't see anything wrong. As I say,

Calling imageWithData:UIImageJPEGRepresentation() multiple times only compresses image the first time

不羁岁月 提交于 2019-12-30 05:26:25
问题 In order to prevent lagging in my app, I'm trying to compress images larger than 1 MB (mostly for pics taken from iphone's normal camera. UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *imageSize = UIImageJPEGRepresentation(image, 1); NSLog(@"original size %u", [imageSize length]); UIImage *image2 = [UIImage imageWithData:UIImageJPEGRepresentation(image, 0)]; NSData *newImageSize = UIImageJPEGRepresentation(image2, 1); NSLog(@"new size %u", [newImageSize

Passing image from one view to another

你。 提交于 2019-12-30 03:32:04
问题 I'm getting an image from the user from the photo gallery, and I want to pass it to a another view... I've read that I should be able to simply do something like this: secView.imgView.image = selectedImage.image; Setting my UIImageView on the second view to be the image from my UIImageView... But the UIImageView in the second view is just empty... My code is this... ViewController.h: @interface ViewController : UIViewController <UINavigationControllerDelegate, UIImagePickerControllerDelegate>

Saving to/getting JPEG from user gallery without recompression

十年热恋 提交于 2019-12-30 03:25:08
问题 I am trying to find a way to read and write JPEG images to user gallery (camera roll) without iOS re-compressing them. UIImage seems to be the bottleneck here. The only method for saving to user gallery I've found is UIImageWriteToSavedPhotosAlbum(). Is there a way around this? For now my routine looks like this –Ask UIImagePickerController for a photo. And when it didFinishPickingMediaWithInfo, do: NSData *imgdata = [NSData dataWithData:UIImageJPEGRepresentation([info objectForKey:@