photolibrary

Email jpg created in app including metadata

☆樱花仙子☆ 提交于 2019-12-18 14:02:12
问题 I have successfully added metadata to a jpg created within the app and saved it to the Camera Roll using the writeImageToSavedPhotosAlbum: metadata: completionBlock: method. However I would also like the option of emailing this jpg with the metadata (such as location, exit, etc.). I use this to email: MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; NSData *myData = UIImageJPEGRepresentation(emailImage, 0.8); [picker

Get all of the pictures from an iPhone photoLibrary in an array using AssetsLibrary framework?

落花浮王杯 提交于 2019-12-17 02:44:10
问题 I want to get all of the pictures from photoLibrary. I would prefer a method or example that I can use directly. 回答1: //View Controller header(.h) file.. #import <UIKit/UIKit.h> #include <AssetsLibrary/AssetsLibrary.h> @interface getPhotoLibViewController : UIViewController { ALAssetsLibrary *library; NSArray *imageArray; NSMutableArray *mutableArray; } -(void)allPhotosCollected:(NSArray*)imgArray; @end //implementation file declare global count variable as static int count=0; @implementation

How to save a couple of images as one image to photo library in swift?

不问归期 提交于 2019-12-13 20:31:40
问题 There are three imageViews in first view controller (two donuts png and one Simpson image). Are there any solutions that I can capture these images as one image and save it to photo library? Thanks. 回答1: Try this, passing in the base view that has all the subviews you need: func createImage(from aView:UIView) -> UIImage { UIGraphicsBeginImageContextWithOptions(CGSize(width: aView.frame.width, height: aView.frame.height), true, 0) aView.layer.render(in: UIGraphicsGetCurrentContext()!) let

Why would app try to save to PLSharedManagedObjectContext?

▼魔方 西西 提交于 2019-12-13 05:29:18
问题 The following is a crash report I received from my crash reporting service, HockeyApp. The reason for the failure is a failure to save in PLSharedManagedObjectContext. I (think) I am doing all of my saves in the main app delegate managedObjectContext. Why is the PLSharedManagedObjectContext the one being saved to? I think this is the relevant code: -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { __ENTERING_METHOD__ DLog(@

Window Phone 8: How to read files from SavedPictures folder into a byte buffer

有些话、适合烂在心里 提交于 2019-12-12 02:35:35
问题 How can we use Pictures/RootPictureAlbum/SavedPicture API of MediaLibrary class to access the photos in SavedPicture folder to read them into byte buffer? 回答1: Try by this way using (var library = new MediaLibrary()) { var savedPictures = library.Pictures.ToList(); if (savedPictures.Any()) { foreach (var pic in savedPictures) { var bitmap = new WriteableBitmap(pic.Width, pic.Height); using (var stream = pic.GetImage()) //here you will get the stream { bitmap.SetSource(stream); } } } } 来源:

MATLAB:: Drawing a number on a image (Matrix) on MATLAB

我的梦境 提交于 2019-12-11 16:11:47
问题 I'm using matlab in order to perform modifications on an image. I have loaded an image on Matlab. (the image may be in different resolutions) Converted the image to gray scale then converted the image's matrix to double. I have drawn grid lines on the image (I have posted the code how to do that somewhere here on stack over flow). My problem is that I may have upon the 1000 squares as a result from girding the image on the X axis and the Y axis. I'd like to numbering the squares in that image

How to delete a photo from camera roll?

孤街浪徒 提交于 2019-12-10 21:38:17
问题 I can write photos to camera roll, but how can I delete one? I remember a couple years ago someone said it is impossible, but I believe I have seen an app recently that did it. 回答1: To delete photo from camera roll is not possible from application. Apple has never given access of delete photo of camera roll from application. 回答2: This is now possible (since iOS 8). Hopefully this helps other folks who end up here from Google. To do this, check out the deleteAssets method of the

The operation couldn’t be completed. (Cocoa error -1.) - PHPhotoLibrary

穿精又带淫゛_ 提交于 2019-12-10 17:16:19
问题 Hi I am trying to save a downloaded mp4 file to my gallery. Downloading the url by using , downloadTask in func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL){ } I am getting the url file:///private/var/mobile/Containers/Data/Application/8D761DFE-C050-426D-B91C-61DE441FB496/Library/Caches/com.apple.nsurlsessiond/Downloads/com.te.dn/CFNetworkDownload_KFSYSW.tmp I am creating a path by using, let path =

Swift iOS -UIImagePicker's Photo Library Is Presented On Simulator But Crashes (won't present) On Actual Device While Running Xcode

淺唱寂寞╮ 提交于 2019-12-10 17:13:16
问题 I'm on Swift 3, iOS 10.3, and Xcode 8.3.3. When I access the photo library on the simulator the UIImagePicker is presented with no problem and I can pick photos. As soon as I try to access the photo library on an actual device (iPhone 7+) the app crashes because the UIImagePicker won't get presented (I don't even get to the point to pick a photo). The odd thing is on an actual device the imagePicker presents the camera and I can take photos with no problem. Even though I didn't add it inside

UIImagePickerController in Storyboard: UIImagePickerControllerSourceTypePhotoLibrary displays black screen

徘徊边缘 提交于 2019-12-10 14:49:46
问题 I have a storyboard where I created a UINavigationController instance and set its custom class to UIImagePickerController . If I set imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera in prepareForSegue , everything works fine. If I set imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary in prepareForSegue , I get a mostly black screen with an empty gray bar on top that I can't dismiss: [future location of screenshot - I cannot post images] I can work around