Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Image Filename and Tag of images in photos album?

Is there a way to get the image file name and tag of images in the photo album?

I'm using ALAssetsLibrary and still scratching...

like image 938
jayr parro Avatar asked Jun 11 '12 04:06

jayr parro


2 Answers

You can copy the ALAssetLibrary object into an array (or better in a Local DB). Make objects of ALAsset to display and give them tag (depending on array index).

Or otherwise if you still wish to continue with the Image names. you can obtain them from the UIImagePickerControllerReferenceURL. Try the substring function to get the name (hint: mostly it is before the &ext, also you can get the extension of file.)

like image 186
Meet Avatar answered Oct 12 '22 08:10

Meet


ALAssetRepresentation *AssetRepObj = [AssetObj defaultRepresentation];
NSString *FileName = [AssetRepObj filename];
like image 22
Bad Boy Avatar answered Oct 12 '22 09:10

Bad Boy