phlivephoto

Saving Already Created Live Photos

笑着哭i 提交于 2020-01-01 17:28:07
问题 I've got some live photos created JPEG and MOV files, now i want to import them into the app that would allow the user to save the live photos to their photo library. How can i go about doing this? I've looked into this: https://github.com/genadyo/LivePhotoDemoSwift Which basically allows you to record video and turn it into a live photo. But since i've already created the "live photos", can i save them to the camera roll right away or do i need to follow a different route? 回答1: You can

Saving Already Created Live Photos

蓝咒 提交于 2020-01-01 17:27:15
问题 I've got some live photos created JPEG and MOV files, now i want to import them into the app that would allow the user to save the live photos to their photo library. How can i go about doing this? I've looked into this: https://github.com/genadyo/LivePhotoDemoSwift Which basically allows you to record video and turn it into a live photo. But since i've already created the "live photos", can i save them to the camera roll right away or do i need to follow a different route? 回答1: You can

How to Get Video from a Live Photo in iOS

为君一笑 提交于 2020-01-01 05:27:06
问题 I'm trying to figure it out, but can't find any useful information. I only found this: PHAssetResourceManager.defaultManager().writeDataForAssetResource(assetRes, toFile: fileURL, options: nil, completionHandler: { // Video file has been written to path specified via fileURL } but I'm ashamed to say I have no idea how to play it out. I've created a UIImagePickerController and loaded an Image from the Camera Roll. 回答1: Use this code to get the video from live photo: - (void

Create PHLivePhoto Programmatically From UIImages

瘦欲@ 提交于 2019-12-11 12:07:24
问题 How can you create a PHLivePhoto programmatically in Objective-C (such as from multiple UIImages, or some other means)? I can't find any solution in Apple's documentation. I know this must be possible in some way as there are multiple apps on the App Store that provide animated Live Photos to use as the Lock Screen on the iPhone 6S. Any help would be greatly appreciated! Thanks 来源: https://stackoverflow.com/questions/36729038/create-phlivephoto-programmatically-from-uiimages

How to extract image from a live photo?

我的梦境 提交于 2019-12-07 22:24:09
问题 I know how to extract video from a live photo. Explained here. Use the PHAssetResourceManager to get the video file from the PHAssetResource . PHAssetResourceManager.defaultManager().writeDataForAssetResource(assetRes, toFile: fileURL, options: nil, completionHandler: { // Video file has been written to path specified via fileURL } But how to extract image URL from PHLivePhoto. The motivation behind this is to get both video and image URL in order to upload it to the server. 回答1: Well

How to extract image from a live photo?

我们两清 提交于 2019-12-06 11:13:51
I know how to extract video from a live photo. Explained here . Use the PHAssetResourceManager to get the video file from the PHAssetResource . PHAssetResourceManager.defaultManager().writeDataForAssetResource(assetRes, toFile: fileURL, options: nil, completionHandler: { // Video file has been written to path specified via fileURL } But how to extract image URL from PHLivePhoto. The motivation behind this is to get both video and image URL in order to upload it to the server. Well assuming you have access to the PHAsset you can do something like the following: [asset

Saving Already Created Live Photos

旧街凉风 提交于 2019-12-04 17:38:26
I've got some live photos created JPEG and MOV files, now i want to import them into the app that would allow the user to save the live photos to their photo library. How can i go about doing this? I've looked into this: https://github.com/genadyo/LivePhotoDemoSwift Which basically allows you to record video and turn it into a live photo. But since i've already created the "live photos", can i save them to the camera roll right away or do i need to follow a different route? ayaio You can create a LivePhoto from separate elements from a LivePhoto by using PHLivePhoto

Extract video portion from Live Photo

非 Y 不嫁゛ 提交于 2019-12-04 09:48:02
问题 Has anyone figured out how to extract the video portion from a Live Photo? I'm working on an app to convert Live Photos into a GIF, and the first step is to get the video file from the Live Photo. It seems like it should be possible, because if you plug in your phone to a Mac you can see the separate image and video files. I've kinda run into a brick wall in the extraction process, and I've tried many ways to do it and they all fail. The first thing I did was obtain a PHAsset for what I think

Is there a way to save a Live Photo to the Photo Library?

二次信任 提交于 2019-12-03 18:53:32
问题 I'm passing stored image and video files to: PHLivePhoto.requestLivePhotoWithResourceFileURLs and getting a PHLivePhoto object that I can display in PHLivePhotoView . But I am wondering, once I have a PHLivePhoto is there a way to save it to the Photo Library? 回答1: NSURL *photoURL = ...; NSURL *videoURL = ...; [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ PHAssetCreationRequest *request = [PHAssetCreationRequest creationRequestForAsset]; //These types should be inferred from your

How to make PHLivePhoto from Mov File?

此生再无相见时 提交于 2019-12-01 12:39:49
I have a one .MOV file and one .JPG file. When I'm trying to make a Live Photo: func makeLivePhotoFromItems(imageURL: NSURL, videoURL: NSURL, previewImage: UIImage, completion: (livePhoto: PHLivePhoto) -> Void) { PHLivePhoto.requestLivePhotoWithResourceFileURLs([imageURL, videoURL], placeholderImage: previewImage, targetSize: CGSizeZero, contentMode: PHImageContentMode.AspectFit) { (livePhoto, infoDict) -> Void in print("info: \(livePhoto)") if let lp = livePhoto { completion(livePhoto: lp) } } } And making like this: makeLivePhotoFromItems(url, videoURL: movURL, previewImage: UIImage(named: