Using exiftool on a mac, I can extract some metadata from shots taken with my iPhone, but I can't seem to get the GPS location data.
I know these shots have Geotags because I can view them in iPhoto and on my phone, but I just can't read them.
Perhaps I'm doing something wrong?
Here's a copy of my output from terminal.
Laptop:~ **********$ exiftool /Users/*************/Documents/IMG_0064.jpg geotag
======== /Users/*******/Documents/IMG_0064.jpg
ExifTool Version Number : 8.60
File Name : IMG_0064.jpg
Directory : /Users/*************/Documents
File Size : 156 kB
File Modification Date/Time : 2011:06:05 23:49:24+01:00
File Permissions : rw-r--r--
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Profile CMM Type : Lino
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1998:02:09 06:49:00
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : IEC
Device Model : sRGB
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : HP
Profile ID : 0
Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
Profile Description : sRGB IEC61966-2.1
Media White Point : 0.95045 1 1.08905
Media Black Point : 0 0 0
Red Matrix Column : 0.43607 0.22249 0.01392
Green Matrix Column : 0.38515 0.71687 0.09708
Blue Matrix Column : 0.14307 0.06061 0.7141
Device Mfg Desc : IEC http://www.iec.ch
Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant : 19.6445 20.3718 16.8089
Viewing Cond Surround : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type : D50
Luminance : 76.03647 80 87.12462
Measurement Observer : CIE 1931
Measurement Backing : 0 0 0
Measurement Geometry : Unknown (0)
Measurement Flare : 0.999%
Measurement Illuminant : D65
Technology : Cathode Ray Tube Display
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Exif Byte Order : Big-endian (Motorola, MM)
Make : Apple
Camera Model Name : iPhone 3G
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : QuickTime 7.6.6
Modify Date : 2011:06:05 23:45:08
Host Computer : Mac OS X 10.6.7
F Number : 2.8
Exposure Program : Program AE
Exif Version : 0220
Date/Time Original : 2011:06:05 23:38:29
Create Date : 2011:06:05 23:38:29
Aperture Value : 2.8
Metering Mode : Average
Flash : No flash function
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 960
Exif Image Height : 1280
Sensing Method : One-chip color area
Exposure Mode : Auto
White Balance : Auto
Scene Capture Type : Standard
Image Width : 960
Image Height : 1280
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Aperture : 2.8
Image Size : 960x1280
This image was written by Qucktime, and isn't an original image from your iPhone. The GPS information should exist in the original image.
Maybe try mailing yourself an image directly from the phone. If you transfer it via iPhoto then who knows what iPhoto does to the metadata. I don't know what other ways there are to transfer an image from the iPhone, but try to get the original unmodified image if you can.
- Phil
Wow! A reply from the developer so fast!
Is that because I used iPhoto to pull them off the phone?
I really don't know another way to get the original photo.
I'm pretty sure you can mail yourself a photo, but I don't know of any other ways to transfer an image from an un-jailbroken iPhone.
I have googled for iPhone 3G sample images and downloaded a number to see what they contain. It seems that they are all written by QuickTime, but many of these also contain GPS information. Not all of the samples contain GPS though. Make sure the specific image you are looking at contains GPS (ie. was it taken outdoors?).
- Phil
Thanks Phil, I tried emailing myself the same photo and was able to pull off the GPS data from that.
Now I've just got to figure out how to read it...
55 deg 56' 32.40" N, 3 deg 10' 54.00" W
Chances are all of the photo's you found were encoded with iPhoto, which I believe from what I've read limits the metadata saved from at iPhones post ios 4.0(hence some having GPS and some not).
Because any other way of importing the photos to a mac is quite tiresome, ie emailing yourself.
Either that or they had GPS services turned off.
The -n or -c FMT option may be useful to change the format of the GPS information if you are reading it with some other software.
- Phil
Can you elaborate on how to use this?
exiftool -n ~/filepath.jpeg?
Never mind, I worked it out.
Thanks for the help, very useful program!
Hope this makes it to the forum. Running a new M1 running Monterey with ExifTool 12.4. I've taken a photo with my iPhone (15.4.1) with Location Services ON and mailed to myself on the M1. But running ExifTool on that image does not show any GPS data. Older photos do show this data. So trying to figure out what's wrong.
~/Desktop trudge: exiftool -n IMG_1995.JPG
ExifTool Version Number : 12.40
File Name : IMG_1995.JPG
Directory : .
File Size : 66987
File Modification Date/Time : 2022:04:17 13:30:32-04:00
File Access Date/Time : 2022:04:17 13:30:35-04:00
File Inode Change Date/Time : 2022:04:17 13:30:34-04:00
File Permissions : 100644
File Type : JPEG
File Type Extension : JPG
MIME Type : image/jpeg
JFIF Version : 1 1
Resolution Unit : 0
X Resolution : 72
Y Resolution : 72
Exif Byte Order : MM
Orientation : 6
Color Space : 1
Exif Image Width : 640
Exif Image Height : 480
Image Width : 640
Image Height : 480
Encoding Process : 0
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : 2 2
Image Size : 640 480
Megapixels : 0.3072
Try accessing the file directly. The output you list has been stripped of nearly all metadata. Whatever you're using to mail it seems to be stripping the data. Or the app that took the photo isn't adding data to begin with.
The photo was taken by my iPhone as posted. I'm mailing it to myself from within the Camera app. So one of them is stripping out metadata?
As mentioned the iPhone is running 15.4.1 and I've used it before to send images via mail. And on those images ExifTool worked fine. Not sure what you mean by "accessing the file directly".
Found a work-around. This link <https://appletoolbox.com/how-to-view-your-photo-metadata-in-ios-13-and-ipados/> has some steps to view metadata on the phone. After following the procedure I mailed the image to myself and saved it on my M1. Running ExifTool on it now returns a ton of metadata.
~/Desktop trudge: exiftool IMG_1992.JPG
ExifTool Version Number : 12.40
File Name : IMG_1992.JPG
Directory : .
File Size : 2.6 MiB
File Modification Date/Time : 2022:04:17 16:15:08-04:00
File Access Date/Time : 2022:04:17 16:15:10-04:00
File Inode Change Date/Time : 2022:04:17 16:15:09-04:00
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
Make : Apple
Camera Model Name : iPhone SE (2nd generation)
Orientation : Rotate 90 CW
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : 15.4.1
Modify Date : 2022:04:16 12:23:57
Host Computer : iPhone SE (2nd generation)
Y Cb Cr Positioning : Centered
Exposure Time : 1/5348
F Number : 1.8
Exposure Program : Program AE
ISO : 20
Exif Version : 0232
Date/Time Original : 2022:04:16 12:23:57
Create Date : 2022:04:16 12:23:57
Offset Time : -04:00
Offset Time Original : -04:00
Offset Time Digitized : -04:00
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/5348
Aperture Value : 1.8
Brightness Value : 11.23508042
Exposure Compensation : 0
Metering Mode : Multi-segment
Flash : Off, Did not fire
Focal Length : 4.0 mm
Subject Area : 2013 1511 2217 1330
Run Time Flags : Valid
Run Time Value : 409013696863458
Run Time Scale : 1000000000
Run Time Epoch : 0
Acceleration Vector : 0.04102043436 -0.9569312928 0.273593277
Sub Sec Time Original : 710
Sub Sec Time Digitized : 710
Flashpix Version : 0100
Color Space : Uncalibrated
Exif Image Width : 4032
Exif Image Height : 3024
Sensing Method : One-chip color area
Scene Type : Directly photographed
Exposure Mode : Auto
White Balance : Auto
Focal Length In 35mm Format : 28 mm
Scene Capture Type : Standard
Lens Info : 3.99000001mm f/1.8
Lens Make : Apple
Lens Model : iPhone SE (2nd generation) back camera 3.99mm f/1.8
Composite Image : General Composite Image
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Altitude Ref : Above Sea Level
GPS Speed Ref : km/h
GPS Speed : 0.6591739053
GPS Img Direction Ref : True North
GPS Img Direction : 69.22688297
GPS Dest Bearing Ref : True North
GPS Dest Bearing : 69.22688297
GPS Date Stamp : 2022:04:16
GPS Horizontal Positioning Error: 30.73498073 m
Compression : JPEG (old-style)
Thumbnail Offset : 2560
Thumbnail Length : 8287
Profile CMM Type : Apple Computer Inc.
Profile Version : 4.0.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 2017:07:07 13:22:32
Profile File Signature : acsp
Primary Platform : Apple Computer Inc.
CMM Flags : Not Embedded, Independent
Device Manufacturer : Apple Computer Inc.
Device Model :
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Apple Computer Inc.
Profile ID : ca1a9582257f104d389913d5d1ea1582
Profile Description : Display P3
Profile Copyright : Copyright Apple Inc., 2017
Media White Point : 0.95045 1 1.08905
Red Matrix Column : 0.51512 0.2412 -0.00105
Green Matrix Column : 0.29198 0.69225 0.04189
Blue Matrix Column : 0.1571 0.06657 0.78407
Red Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
Chromatic Adaptation : 1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168
Blue Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
Image Width : 4032
Image Height : 3024
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Run Time Since Power Up : 4 days 17:36:54
Aperture : 1.8
Image Size : 4032x3024
Megapixels : 12.2
Scale Factor To 35 mm Equivalent: 7.0
Shutter Speed : 1/5348
Create Date : 2022:04:16 12:23:57.710-04:00
Date/Time Original : 2022:04:16 12:23:57.710-04:00
Modify Date : 2022:04:16 12:23:57-04:00
Thumbnail Image : (Binary data 8287 bytes, use -b option to extract)
GPS Altitude : 234 m Above Sea Level
GPS Latitude : 46 deg 20' 2.85" N
GPS Longitude : 79 deg 28' 5.50" W
Circle Of Confusion : 0.004 mm
Field Of View : 65.5 deg
Focal Length : 4.0 mm (35 mm equivalent: 28.0 mm)
GPS Position : 46 deg 20' 2.85" N, 79 deg 28' 5.50" W
Hyperfocal Distance : 2.07 m
Light Value : 16.4
Lens ID : iPhone SE (2nd generation) back camera 3.99mm f/1.8
Quote from: trudge on April 17, 2022, 03:17:57 PM
And on those images ExifTool worked fine. Not sure what you mean by "accessing the file directly".
I meant copy it directly from the phone, though I now faintly recall it not being as easy as hooking up a usb cable.
With my android phone I'll connect it to the desktop with a usb cable. My phone will also automatically upload to Dropbox and Amazon Photos, so I can copy the images over that way.