← Harley TuranAugust 2023

Exploring EXIF

According to iOS’ Photos application, I’ve taken 73,281 photos over the past 14 years of owning an iPhone.

Each one of those images doesn't just contain the photo you see as you scroll through the Photos app — it contains a wealth of information stored encoded directly into the image file itself. It details useful metadata such as where the photo was taken (so that you can view your photos on a map at a later date), the time and date the image was taken at, which lens and zoom levels were used, the exposure, ISO, and aperture, amongst many others.

There are many, many tools for viewing this information. Whichever app you use to manage your photos will display this metadata alongside the image, such as in iOS 16 here:

This metadata is called EXIF (Exchangeable Image File Format) and is stored inside of the photo files themselves, appearing right at the start of the image (before any image data appears). If we inspect the contents of a JPEG photo directly exported from an iPhone, we see the EXIF data marker (FFE1) appear directly after the JPEG Start of Image marker (FFD8):

You‘ll be pleased to know this piece won't be spent going over every byte in the image above. Instead, we’ll be looking into what a photo contains, and the various ways in which we can display, query, and interact with the data therein.

What‘s in a photo?

The following visualization shows the vast amount of information stored within a single image. Feel free to pick from the curated examples from my personal photo library, or select your own image to view the EXIF data stored. Note that any images selected remain client-side and never leave your web browser. Client-side EXIF parsing is handled by the ExifReader library by Mattias Wallander.

Bits Per Sample
8
Image Height
1280px
Image Width
960px
Color Components
3
Subsampling
YCbCr4:2:0 (2 2)
Make
Apple
Model
iPhone 12 Pro
Orientation
top-left
XResolution
72
YResolution
72
ResolutionUnit
inches
Software
16.6
DateTime
2023:08:13 13:07:57
HostComputer
iPhone 12 Pro
TileWidth
512
TileLength
512
YCbCrPositioning
centered
Exif IFD Pointer
258
GPS Info IFD Pointer
2224
ExposureTime
1/856
FNumber
f/2
ExposureProgram
Normal program
ISOSpeedRatings
25
ExifVersion
0232
DateTimeOriginal
2023:08:13 13:07:57
DateTimeDigitized
2023:08:13 13:07:57
OffsetTime
+01:00
OffsetTimeOriginal
+01:00
OffsetTimeDigitized
+01:00
ComponentsConfiguration
ShutterSpeedValue
1/856
ApertureValue
2.00
BrightnessValue
9.10714795263233
ExposureBiasValue
0
MeteringMode
Pattern
Flash
Flash did not fire, compulsory flash mode
FocalLength
6 mm
SubjectArea
Rectangle; X: 2004, Y: 1514, width: 2318, height: 1393
MakerNote
[Raw maker note data]
SubSecTime
524
SubSecTimeOriginal
524
SubSecTimeDigitized
524
FlashpixVersion
0100
ColorSpace
Uncalibrated
PixelXDimension
4032
PixelYDimension
3024
SensingMethod
One-chip color area sensor
SceneType
A directly photographed image
ExposureMode
Auto exposure
WhiteBalance
Auto white balance
FocalLengthIn35mmFilm
52
SceneCaptureType
Standard
LensSpecification
1.5399999618512084-6 mm f/2.4
LensMake
Apple
LensModel
iPhone 12 Pro back triple camera 6mm f/2
CompositeImage
General Composite Image
GPSLatitudeRef
North latitude
GPSLatitude
51.11505833333334
GPSLongitudeRef
East longitude
GPSLongitude
0.5824055555555555
GPSAltitudeRef
Sea level
GPSAltitude
58.61263655152052 m
GPSSpeedRef
Kilometers per hour
GPSSpeed
0
GPSImgDirectionRef
True direction
GPSImgDirection
183.541214057508
GPSDestBearingRef
True direction
GPSDestBearing
183.541214057508
GPSHPositioningError
3.5355339046563916
Preferred CMM type
Apple
Profile Version
4.0.0
Profile/Device class
Input Device profile
Color Space
RGB
Connection Space
XYZ
ICC Profile Date
2016-01-01T00:00:00.000Z
ICC Signature
acsp
Primary Platform
Apple
Device Manufacturer
Apple
Device Model Number