camera-roll

How to save SKSpriteNode as PNG image to Camera Roll?

非 Y 不嫁゛ 提交于 2021-01-27 20:38:25
问题 I'm trying to convert SKSpriteNode as a PNG image with transparency to Camera Roll. This saves the image but not with transparency: let image = UIImage(cgImage: (spriteNode.texture?.cgImage())!) UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) This complains: Cannot convert value of type 'Data?' to expected argument type 'UIImage' let image = UIImage(cgImage: (createdCloudShadow.texture?.cgImage())!) let image2 = UIImagePNGRepresentation(image) UIImageWriteToSavedPhotosAlbum(image2, nil,

How to open iOS gallery app from React Native app

流过昼夜 提交于 2020-04-11 03:37:43
问题 I'm having trouble opening iOS gallery app from React Native app. I have the file url and asset url. I got the asset url from CameraRoll. Now I want to open the gallery itself to see the image. This is the code that I use openGallery = () => { // this code is working on android using asset url // sample url on iOS // file url : file:///var/mobile/Containers/Data/Application/A41FFC2E-06D4-445D-9B94-D21E885930C7/Documents/video/popcam-1527202811.mov // asset url : assets-library://asset/asset

Save Video to CameraRoll React-Native

烂漫一生 提交于 2020-01-24 05:20:27
问题 It´s possible to save a video on React-Native using cameraRoll, for images with saveImageWithTag() it´s easy but i can´t found documentation for videos. 回答1: It is very easy to save a video to CameraRoll, I did it with the following line of code. saveVideoToCameraRoll = async (uri) => { await CameraRoll.saveToCameraRoll(uri, 'video') } NB: Obviously this function expects a uri or filePath of your video. 来源: https://stackoverflow.com/questions/35258483/save-video-to-cameraroll-react-native

Get All Images from cameraroll asynchrously

做~自己de王妃 提交于 2020-01-17 05:49:32
问题 I want to get all images from cameraroll asynchrously Now I am using that code but my application got hanged untill all the images retrieved , I noticed in instigram or other application it doen't take time to load picture from camerroll. -(void)getAllPictures { NSLog(@"i m in "); imageArray=[[NSArray alloc] init]; mutableArray =[[NSMutableArray alloc]init]; NSMutableArray* assetURLDictionaries = [[NSMutableArray alloc] init]; library = [[ALAssetsLibrary alloc] init]; void (^assetEnumerator)(

How to save a Picture to a specific folder from React Native Camera Roll

老子叫甜甜 提交于 2019-12-22 11:27:35
问题 So I'm using Expo's Camera API to take a picture, like so: takePicture = async function() { if(this.camera) { this.camera.takePictureAsync().then(data => { CameraRoll.saveToCameraRoll(data.uri); }).then(() => { this.setState({ photoId: this.state.photoId + 1, }); }); } }; Now, I'd like to specifically retrieve the pictures I take with this app to work with later. I figure an easy way to do this would be if the app saved its pictures to a separate folder in the camera roll, much like how

How we can upload camera roll image automatically to server

若如初见. 提交于 2019-12-12 04:56:16
问题 How I can upload a camera roll image automatically to server? This same thing implemented in Dropbox and Google Photos and some other apps also. What should I do to achieve such kind of functionality in my app? 回答1: What you are asking is not a single question, but a paradigm. An entire process, that includes: Obtaining authorisation to access the photo library. Accessing assets (images/videos) in the user's gallery. Uploading to a server. Read up on all the three, if you want to achieve this

iOS rename/delete albums of photos

梦想与她 提交于 2019-12-11 17:55:36
问题 I am able to add photos and create albums from my app but I also want to be able to rename/delete albums and pictures in these albums. I know Apple have restrictions but is it possible at least to manage the albums and photos created by my application? (ALAsset and ALAssetLibrary) I understand I can't do anything to the already existing albums and photos in the Camera row and I am ok with this. 回答1: If you created an album, so that the album is editable , then the presence or absence of an

React Native - Adding margin: 1 in Camera Roll

偶尔善良 提交于 2019-12-11 17:13:44
问题 How to add margin: 1 perfectly in my Camera Roll? Because when I add margin: 1 in my <Image .../> the order will not be in correct order. The result I want is like in the Instagram. There's no margin in the Left and Right Side, right? Just like this Image: Here are my Codes: render() { return( <View style={styles.container}> {/* <SelectedImage source={{uri: this.state.pickedImage}}/> */} <Image source={{uri: this.state.pickedImage}} style={styles.image}/> <ScrollView contentContainerStyle=

ALAssetRepresentation not listing exact metadata details for all images

故事扮演 提交于 2019-12-11 08:58:19
问题 ALAssetRepresentation not listing the metadata details properly i,e when I try to get an image metadata, it returns only few details as below 2015-06-25 10:15:22.134 Phokl copy[1394:607] { ColorModel = RGB; DPIHeight = 72; DPIWidth = 72; Depth = 8; Orientation = 1; PixelHeight = 1250; PixelWidth = 834; "{Exif}" = { ColorSpace = 1; ComponentsConfiguration = ( 1, 2, 3, 0 ); ExifVersion = ( 2, 2, 1 ); FlashPixVersion = ( 1, 0 ); PixelXDimension = 834; PixelYDimension = 1250; SceneCaptureType = 0

UIVideoAtPathIsCompatibleWithSavedPhotosAlbum returns false when deploying on the iPhone

隐身守侯 提交于 2019-12-07 06:47:23
问题 One of my app's features is to download a mp4 file and store it to the local phone album. I have tried several approaches since and the result is always the same, it worked on the simulator but not on the actual iPhone. Xcode is version 5.0.1, iPhone 4. Below is the code I applied on the last attempt before posted here using ASIHttpRequest library and the result is still the same, it worked on the simulator but not the phone itself. download: ASIHTTPRequest* request = [ASIHTTPRequest