Photo info on iPhone 4 - iphone

I'm picking photos from the photo albums on iPhone 4 with the help of UIImagePickerController. One question:
I would like to verify the origin of the photo the user picked. Specifically speaking, I want to know that weather this photo was taken right by this iPhone 4, or was imported or downloaded from elsewhere. Where can I get this set of information? The corresponding NSDictionary?
Thanks in advance.

What you want is extracting EXIF info from the picture and check the camera-model.
You will never be sure that the picture is taken from THIS iPhone but chances are good :-)
Check this post : How to get EXIF data from my jpegs?

Related

iPhone is there a way to analyze timestamps of all photos on the camera roll?

I have ~3200 photos on my iPhone over 2 years and would like to create an app that analyzes and plots when I took these pictures (ex: I was very actively photographing for a week, and then stopped). Is there a way to do bulk processing of camera roll photos on iPhone(with user permission) to extract timestamps of photos?
I think if I back up my photos to my mac with the "image capture" app, I can do this kind of metric analysis with a Mac app, but the import process would take hours and I'm looking for something simpler.
Take a look at ALAssetsLibrary
An instance of ALAssetsLibrary provides access to the videos and
photos that are under the control of the Photos application.
Here is sample application PhotosByLocationn.
Demonstrates how to use the AssetsLibrary APIs to provide a custom
image picking UI. The user experience is centered around the idea of
using the assets location and time metadata as a basis for certain
features.
Yes you can use the Assets Library for this.
This fill allow you acces to the image on the users device.

Creating an app that accesses all images in user's Photos for iOS?

I haven't found any documentation on this or seen this done before, but is there anyway I can, instead of just choosing one image with UIImagePicker, load the user's albums, and then after selecting an image, that image displays, but also allows me to scroll left and ride to see all the images before and after that image?
I know I can use a multiple image picker, but that involves importing all the user's photos, and if the user has hundreds of photos, this would take a lot of time. I'm looking for similar functionality to the real photos app- the performance and everything. Any ideas?
Yes, you can. Look at the documentation for ALAssetsLibrary. This will allow you to enumerate all the user's image (and video) libraries. From this, you get ALAssets, which you can ask for their default ALAssetRepresentation. This one, in turn, you ask for its CGImage, from which you can create a UIImage.
Enumerating Libraries and Assets is done in blocks, which can easily be done in the background.
Use the assets library: http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html
An instance of ALAssetsLibrary provides access to the videos and
photos that are under the control of the Photos application.
The library includes those that are in the Saved Photos album, those
coming from iTunes, and those that were directly imported into the
device. You use it to retrieve the list of all asset groups and to
save images and videos into the Saved Photos album.
note: only available in ios 4+

Using a UIImagePicker that only contains photos taken within the app

I'm using source code from apple (SquareCam) and I would like to figure out how I can use the photos taken in that app and see them in a library (like the photos app) without having all the other photos the user has taken elsewhere like in the regular camera.
I'm not too great at making apps yet so I'm pretty noobish.
I've gotten as far as opening the photo library but nothing else. no viewing individual photos or the options such as emailing, messaging and what not.
Don't think you can do that. It either all photos or no photos...
You can of course save the photo in your own documents directory and write your own photo viewer - there's quite some code and frameworks around that do most of the job, see e.g. the answers to this so question:
Open source photo viewer for IPhone

objectiveflickr geotag

I am trying to use objectiveflickr to upload an image to flickr from my iphone but for some reason it strips the EXIF info (i want the image geotagged), is there a way around this?
Maybe it's related to this issue :
UIImagePickerController and extracting EXIF data from existing photos
See my answer to this question there :
UIImagePickerController and extracting EXIF data from existing photos

Saving images inside iPhone application without using database or server side saving technique

I am developing an application which requires saving images in the "saved folder" of iPhone Photo album after performing some animations on ImageViews. Is it possible to save the incomplete images temporarily in the iphone application without using database or server side saving technique, so that user can use it for future use and only completely changed ones should get saved in Photo Album? If yes then it would be a great help to get any code or suggestion.
Thanks in advance :) !!!!
Sure, images can be converted to NSData objects, which can then be written to a standard file. Check out UIImagePNGRepresentation() and -[NSData writeToFile:atomically:].
You can then save to the standard native Photo album application using the technique described here (from a UIImage instance):
How to save picture to iPhone photo library?