alasset

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

Video File thumbnail timestamp missing in ALAsset

為{幸葍}努か 提交于 2019-12-11 15:36:49
问题 hi i am getting all photos and videos thumbnails from ALAsset library. my code works fine i am getting photos and video thumbnail.but in video thumbnail missing Video icon and its time stamp. [assetImageView setImage:[UIImage imageWithCGImage:[self.asset thumbnail]]]; i am getting like above..i am using ELCImagePickerDemp API i need to get like this i am missing time and icon in lower right corner thumbnail. any help will be appreciated... THX 回答1: The assetslibrary thumbnail as you noticed

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

Save Video into Custom Album iOS

我只是一个虾纸丫 提交于 2019-12-10 12:25:04
问题 How to save video with my custom album . I found one link but it don't work Custom file manager It gives the url value is null. [VideoAlbumManager addVideoWithAssetURL:outputFileUrl toAlbumWithName:@"Video Maker"];//outputfileurl is my video url from document directory Give any suggestion for this.. 回答1: You can use this link to save the video.. GitHub Link Import this two files into your project. ALAssetsLibrary+CustomPhotoAlbum.h ALAssetsLibrary+CustomPhotoAlbum.m Then in your save IBAction

fast method to get RGB data from UIImage (photo library)

时光怂恿深爱的人放手 提交于 2019-12-08 03:17:24
问题 I would like to get a data array containing the RGB representation of a picture stored in the photo library (an ALAsset) on iOS (ios8 sdk). I already tried this method : get the a CGImage from ALAsset with [ALAssetRepresentation fullScreenImage] draw the CGImage to a CGContext. That method works, I get a pointer to rgb data, but this is really slow (there are 2 conversions). The final goal is to load the image quickly in a OpenGL texture. My code to get an image from Photo library ALAsset*

iphone image ALAsset problem

你说的曾经没有我的故事 提交于 2019-12-07 19:29:10
问题 First of all sorry for the crappy formatting. I dont know how to format the code here.I am having a problem with retrieving the image from the photo library. I have pasted my code Please help me. I am having this problem from many days. here, I am storing the image path in the database using the referenceURL. It is in the -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info NSURL *imageUrl = [info valueForKey

How to play multiple videos smoothly in iOS in UICollectionView?

元气小坏坏 提交于 2019-12-07 10:48:09
问题 I want to play multiple videos in infinite loop in my collection view. Each Video represent a cell. I am using ALAsset. I am playing this using AVPLayer but it's not loading and playing smoothly. Any Suggestions. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cellIdentifier" forIndexPath:indexPath]; CGRect attachmentFrame =

ALAsset valueForProperty:ALAssetPropertyLocation undeclared?

Deadly 提交于 2019-12-06 15:29:22
This might seem too easy or maybe it's just confusing for me... Or maybe I'm too tired to think rationally. I am trying to get the location of an UIImage that has been selected by the user from the photo album using imagePickerController. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *pic = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; NSData *data = UIImageJPEGRepresentation(pic, 0.01f); UIImage *image1 = [UIImage imageWithData:data]; bookmarkImage.image = image1; NSLog(@"new image size = %i", [data

How to update exif of ALAsset without changing the image?

随声附和 提交于 2019-12-06 06:13:24
问题 I use setImageData:metadata:completionBlock: of ALAsset to update the exif(metadata) of an asset. I just want to update the metadata, but this method require an imageData as the first parameter. I use the code below to generate imageData , but it modified my image(I checked the file size and file hash). ALAssetRepresentation *dr = asset.defaultRepresentation; UIImage *image = [UIImage imageWithCGImage:dr.fullResolutionImage scale:dr.scale orientation:dr.orientation]; NSData *data =

Set Maximum Size for CGImageRef from ALAssetRepresentation

本秂侑毒 提交于 2019-12-05 21:21:45
I am currently using the following code to get an UIImage from an ALAsset in an iOS app. ALAssetRepresentation *rep = [self.asset defaultRepresentation]; CGImageRef ref = [rep fullResolutionImage]; ALAssetOrientation orientation = [[self.asset valueForProperty:@"ALAssetPropertyOrientation"] intValue]; UIImage *image = [UIImage imageWithCGImage:ref scale:1.0 orientation:(UIImageOrientation)orientation]; This works very well as long as the image is reasonably small (e.g. taken with the device's camera). However if the image is too large (6000px^2 and more), the app will run out of memory during