uiimagepickercontroller

There is a black bottom space below the camera

你离开我真会死。 提交于 2019-12-04 08:54:10
I am presenting an UIImagePickerController from a UITabBarController . let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = .Camera imagePicker.allowsEditing = false imagePicker.showsCameraControls = false presentViewController(imagePicker, animated: true, completion: nil) I have explicitly set showsCameraControls to false to put my custom overlay view on top of camera.But why there is a black space on the bottom?any helps? The camera aspect ratio is 4:3,you have to apply a transform scale so that you can get full screen Swift let screenSize =

Save photo with geolocation data to photo library Swift 3

狂风中的少年 提交于 2019-12-04 08:54:07
How can I save a photo to photo library with geolocation metadata? I have requested (and allowed) the app to access user location: private func allowAccessToUserLocation() { locationManager = CLLocationManager() locationManager.delegate = self locationManager.requestWhenInUseAuthorization() } Do I need to ask for specific premissions for the camera app? EDIT: I use UIImagePickerController to take photos from within the app. All photos taken from within the app are stored in the photo library WITHOUT the geolocation. Does it have anything to do with the way I save the image to photo library? Is

How to get the edited image from UIImagePickerController in Swift?

China☆狼群 提交于 2019-12-04 08:34:35
I have seen and read the documents of Apple where they have clearly mentioned about the key UIImagePickerControllerEditedImage . But when I am running my following code, I am not getting that key in the Dictionary. What is the reason behind this? My Code: func imagePickerController(picker: UIImagePickerController!, didFinishPickingMediaWithInfo info:NSDictionary!) { println(info) //var tempImage:UIImage = info[UIImagePickerControllerOriginalImage] as UIImage var tempImage:UIImage? = info[UIImagePickerControllerEditedImage] as? UIImage profileButton.setImage(tempImage, forState: UIControlState

How to write/get latitude longitude with image in uiimagepickercontroller?

ぃ、小莉子 提交于 2019-12-04 08:34:12
Currently I am saving and image with the following method in "saved photos album". UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); Now I want to associate the current latitude and longitude with that image. How can I do so ? Can I do with its mediaInfo dictionary (metadata). I am working in ios sdk 3.0 . Please tell me How to get /set geo data with an image in UIImageViewPickerController AFAIK this is not supported in iOS 4.0 and lower. As of iOS 4.1, you can use -[ALAssetsLibrary writeImageToSavedPhotosAlbum:metadata:completionBlock:]

Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?

北城以北 提交于 2019-12-04 08:29:09
I have just updated to the new Xcode beta 6.0 and when trying to compile for an ipad mini with iOS 8 I am getting a weird error in the console: "Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?readonly_shm=1 read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption" This happens when executing the following code: if ([self.rootDelegate respondsToSelector:@selector(wImageRequiresAPhotoPicker:)]){ [self.rootDelegate wImageRequiresAPhotoPicker:(DWImage*)item]; } And: -(void

UIImagePickerController that allowsEditing incorrectly crops the image leaving a black bar across the top

陌路散爱 提交于 2019-12-04 07:48:29
I'm using UIImagePickerController in a popover on the iPad to take a picture with the front camera. I set allowsEditing to YES and get the awesome built in "Move and Scale" view after taking the picture. The crop rectangle in this view measures 320x267 on the screen despite the fact that the image is cropped to a 320x320 square ( http://dl.dropbox.com/u/2246698/moveAndScale.png ). If i accept the image as is without resizing or moving it, there is a ~25px high black bar across the top as if the crop rectangle has been positioned too high on the image ( http://dl.dropbox.com/u/2246698/cropped

How to crop image after taken from UIImagePicker Camera?

浪子不回头ぞ 提交于 2019-12-04 06:46:51
I'm trying to allow the user to take 16x9 aspect ratio images to look like they are nice HD photos. I'm using the cameraViewOverlay to overlay black bars on both ends, but when the image is taken, how do I crop the top and bottom without resizing or changing the scale of the image? Thanks. David Maymudes There are various posts around on how to scale/crop a UIImage you get back from the camera, like this one . It's a little trickier than you'd expect, because camera images are rotated, so you have to think about rotations even if you're just cropping. you can add "picker.imageEditing=YES" to

iOS 4: FigCreateCGImageFromJPEG returned -1

允我心安 提交于 2019-12-04 06:36:54
问题 I'm trying to get a basic image picker/photo taker running in my app and have run into the following error: *** ERROR: FigCreateCGImageFromJPEG returned -1. Input (null) was 551120 bytes I have the image picker showing, the camera view works fine. When I take an image with the camera and select the 'use' button the error appears in the console and the app crashes. The App works fine just for selecting an image from the album. I have looked at similar threads here and no solution seems to have

Use the UIImagePickerController on a iphone simulator

隐身守侯 提交于 2019-12-04 06:29:09
I have the method, that take photos from gallery or from the camera -(IBAction) getPhoto:(id) sender { UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; if((UIButton *) sender == choosePhotoBtn) { picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } else { picker.sourceType = UIImagePickerControllerSourceTypeCamera; } [self presentModalViewController:picker animated:YES]; } But when i run it on the simulator, code doesnt work. And it doesnt work in picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum and

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

倾然丶 夕夏残阳落幕 提交于 2019-12-04 06:25:14
问题 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: