I'm developing an application and I'd like to list the images present in the "Documents" directory of my application (to load images using iTunes) and I'd like to list the images and photos taken by the Camera as well.
And I do know about UIImagePickerController, but I don't need that. I want to integrate the photos and the loaded application images in the same place. But I can't find any information about where can I find all the device camera photos.
Thanks in advance
You can access all the photos stored in the photo library using the Assets Library Framework. Check out the documentation here:
https://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/AssetsLibraryFramework/_index.html
Specifically, you want to use ALAssetsLibrary's enumerateGroupsWithTypes:usingBlock:failureBlock: to enumerate the ALAssetsGroupSavedPhotos type, and enumerate the photos in that group with ALAssetGroup's enumerateAssetsUsingBlock:.
Some links with sample code:
http://www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/
http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/
Related
Is there a way to get the URLs of videos that are included in the Photos library?
I want to compare them to a table view list, then pick and play that video.
If you're using the newer Photos framework (which you should unless you're still needing to support < iOS 8) and your goal is to simply compare items retrieved from the photo library for uniqueness, I'd recommend fetching PHAssets from the PHPhotoLibrary and using the PHObject's localIdentifier getter to compare the items.
If you're not using the Photos framework, you can also use AVAsset's URL property to get the local file path for a specific AVURLAsset.
I need some advice. In my application people can upload images. I will store the images on a server. I want to make a photo gallery where you can see all uploaded images. Every user has a account. And it will download all uploaded images.
The point is that when you uploaded 1 image it has to download 1 image. But when you upload 10 or more the app will have to download all images and cache the images to your device.
What is the best way to download all images and keep the app running without getting stuck. Also what is the best way to cache all images.
If you want to create some photo gallery apps, check out this open source sample.
Created by Michael Waterfall, which includes photo gallery from images stored on server or locally.
You can modify the code as per your project requirements. And it is easy to handle the images.
I've got a question. Is there possiblity to select from code a given set of pictures from iOS device photos library? I don't want to use UIImagePickerController because I want to decide for user which pictures I want to refer to in my application.
Didn't find anything viable because all questions are about or related to UIImagePickerController.
Hints for you
You can use The Assets Library Framework. Read the documentation: http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/AssetsLibraryFramework/_index.html
Or you can use some of the code from: http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/
Suppose mp3 files that have multiple images saved as album art in a user's music library.
Retrieving the MPMediaItemPropertyArtwork from the media item in IOS seems to only retrieve a single image. Is it possible to get the collection of images out of the meta data? Do all the images even make it into the device (iphone/ipad) or are extraneous images stripped out and only one of the images makes it through the transfer?
Here is a link to what itunes displays for one of these types of file:
http://www.djfx.us/imagebin/MultipleArtwork.png
Many thanks to the contributors of this forum!
Rgds,
Felipe
I am working on an app for iPad where I want to have lets say 100 jpg's in a folder.
They could be named like 01.jpg, 02.jpg etc.
In my app I like to browse those images and when clicking on one of them I need the name of the image to be able to send some data over the network (the data part works fine).
I tried to use UIImagePicker but I found out there are no name connected to the actual image.
Then I made another approach where I have a number of pages where I have buttons and here I load in the images which works fine as long the are a part of the recourse of the project...
But here comes the real problem.
The user of the app should be able to change those images over time without recompiling the app.
So I do look for a way to have a folder where the user can place/replace images with the names 01.jpg etc and the app to use those updated images.
Ideas are very welcome.
Wiljan
I am not sure that I understand what you mean, but You can save images in your application documents folder. You can find more details at:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/StandardBehaviors/StandardBehaviors.html#//apple_ref/doc/uid/TP40007072-CH4-SW6
You can also use NSFileManager to copy files.
what I suggest to do is :
put default images on project resources.
At first start, copy files to documents folder.
always use images from documents folder.