Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - access location information from a photo

Is it possible, in an iPhone app, to extract location information (geocode, I suppose it's called) from a photo taken with the iPhone camera?

If there is no API call to do it, is there any known way to parse the bytes of data to extract the information? Something I can roll on my own?

like image 435
bpapa Avatar asked Mar 05 '09 19:03

bpapa


People also ask

Can you get location information from a photo?

The best way to find the location of a Google Earth photo is to use a reverse image search. Right-click the image you wish to search and select “Copy image address.” Visit Google Images and click the camera icon on the search bar. Paste the image address into the search bar then click “Search” button.

Do iPhone Photos have location metadata?

Nearly every photo you take on your iPhone has a batch of hidden information stored within: metadata. This metadata, known more specifically as EXIF data for images, contains descriptive information that makes each image unique. That includes the creation date, camera information and settings and your location.

How do I see where a photo was taken on my iPhone?

When you snap a selfie, remember to look at the camera lens itself, not the camera app screen where you see a live view of yourself. (That is, unless you are intentionally looking away from the camera to create a different look.)

Can an iPhone photo be traced?

Download EXIF Metadata from the App Store for free. Launch the app and select a photo from your library. The app will show a map of where the photo was shot, but most importantly, it will show the GPS coordinates, altitude, and address (when available).


1 Answers

Unfortunately no.

The problem is thus;

A jpeg file consists of several parts. For this question the ones we are interested in are the image data and the exif data. The image data is the picture and the exif data are where things like geocoding, shutter speed, camera type and so on are stored.

A UIImage (and CGImage) only contain image data, no tags.

When the image picker selects an image (either from the library or the camera) it returns a UIImage, not a jpeg. This UIImage is created from the jpeg image data, but the exif data in the jpeg is discarded.

This means this data is not in the UIImage at all and thus is not accessible.

like image 94
Andrew Grant Avatar answered Oct 06 '22 01:10

Andrew Grant