photolibrary

Fetch only photos of type PHAssetMediaTypeImage form asset collection type PHAssetCollectionTypeSmartAlbum

帅比萌擦擦* 提交于 2019-12-09 08:05:24
问题 I am using the Photos framework to fetch album list in iOS8. I am able to do it using PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil]; This gives me a list of all smart albums including videos. How can I filter out videos from this list. I need only images. Help would be appreciated. Thanks. 回答1: You should set up fetch options, its has a property predicate , which can be

Save gif to iOS Photo Library in Swift

拜拜、爱过 提交于 2019-12-07 13:30:47
问题 I'm traing to save a GIF image located in temp file already created with Regift code. Regift: https://github.com/matthewpalmer/Regift The thing is that after saving with PHPhotoLibrary the GIF become a still image. In other questions there's answers that refeer AssetsLibrary but this has been deprecated by Apple and doesn't work for iOS 10. Questions: Save GIF image from URL to Camera Roll How to write animated GIF to iOS camera roll? None of this answers works... I just want to convert an

ionic 3 photo library image not displayed on img tag

非 Y 不嫁゛ 提交于 2019-12-07 08:40:46
问题 I followed the instruction on ionic doc here and Github doc here. Up to now I can retrieve all library item info. But I never succeed in displaying the photos on img tab. Here are my home.ts : import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { PhotoLibrary } from '@ionic-native/photo-library'; import { Platform } from 'ionic-angular'; import { ChangeDetectorRef } from '@angular/core'; import { DomSanitizer, SafeUrl } from '@angular/platform

Windows Phone: How to retrieve the same photo from media library between application instances

ぃ、小莉子 提交于 2019-12-06 11:35:19
问题 How do I retrieve the same photo from the media library between application instances? I launch the photo library for the user to select a photo via: PhotoChooserTask myPhotoChooser = new PhotoChooserTask(); myPhotoChooser.ShowCamera = true; myPhotoChooser.Show(); myPhotoChooser.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed); and then in the Event handler, I retrieve the file name of the selected file like this: private void cameraCaptureTask_Completed(object sender,

ionic 3 photo library image not displayed on img tag

混江龙づ霸主 提交于 2019-12-05 15:04:27
I followed the instruction on ionic doc here and Github doc here . Up to now I can retrieve all library item info. But I never succeed in displaying the photos on img tab. Here are my home.ts : import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { PhotoLibrary } from '@ionic-native/photo-library'; import { Platform } from 'ionic-angular'; import { ChangeDetectorRef } from '@angular/core'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { library

Windows Phone: How to retrieve the same photo from media library between application instances

若如初见. 提交于 2019-12-04 18:06:33
How do I retrieve the same photo from the media library between application instances? I launch the photo library for the user to select a photo via: PhotoChooserTask myPhotoChooser = new PhotoChooserTask(); myPhotoChooser.ShowCamera = true; myPhotoChooser.Show(); myPhotoChooser.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed); and then in the Event handler, I retrieve the file name of the selected file like this: private void cameraCaptureTask_Completed(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { string imagePath = e.OriginalFileName.ToString();

UIImagePickerController Pick Multiple images

ε祈祈猫儿з 提交于 2019-12-04 14:25:19
问题 I am trying to simply enable picking multiple images from photolibrary using the UIImagePickerController, I wish I can add a subview on bottom of the photo picker so it look something like this app does: It there a simple way you can do it? My code currently only pops the images in a standard way but I only dismiss the controller when loaded 6 images The important thing there is if anyway I can add a small view/toolbar to the photo picker view, like the example did, I then can do the rest -

Accessing the camera and photo library in swift 4

僤鯓⒐⒋嵵緔 提交于 2019-12-04 14:20:16
问题 I'm trying to access both the camera and photo library in swift4 using the following code let imagePickerController = UIImagePickerController() imagePickerController.delegate = self let alert = UIAlertController(title: "", message: "", preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Camera", style: .default, handler: {(action: UIAlertAction) in imagePickerController.sourceType = .camera print(1) })) alert.addAction(UIAlertAction(title: "Photo Album", style: .default,

UIImagePickerController Pick Multiple images

断了今生、忘了曾经 提交于 2019-12-03 09:02:52
I am trying to simply enable picking multiple images from photolibrary using the UIImagePickerController, I wish I can add a subview on bottom of the photo picker so it look something like this app does: It there a simple way you can do it? My code currently only pops the images in a standard way but I only dismiss the controller when loaded 6 images The important thing there is if anyway I can add a small view/toolbar to the photo picker view, like the example did, I then can do the rest - (void)getMediaFromSource:(UIImagePickerControllerSourceType)sourceType{ //get all available source types

uiimagepickercontroller - get the name of the image selected from photo library

折月煮酒 提交于 2019-12-03 07:52:42
问题 I am trying to upload the image from my iPhone/iPod touch to my online repository, I have successfully picked the image from Photo Album but i am facing one problem i want to know the name of the image such as image1.jpg or some thing like that. How i would know the name of the picked image. 回答1: I guess knowing the exact image name would not be an issue rather getting a unique name for the picked image would solve your purpose so that you can upload the image on server and track it via its