How to count the total number of photos on an iphone
1 answer
At least in SDK 2.x, you cannot programmatically access the actual photo files from code. However, you can access photo thumbnails, which you can use to get the number of photos.
The original photos themselves are in a special database file (/ private / var / mobile / Media / Photos / Photo Database), and the thumbnails are in the directory (/ private / var / mobile / Media / Photos / Thumbs).
Photos can only be accessed through the interactive UIImagePickerController . Reverse engineering. The photo base file format is the only way I can see to programmatically access the original photo files.
I haven't checked the situation for the 3.0 SDK, it might give you some API to programmatically access photos.
+2
source to share