# How do XMP files encode aperture?

When I open a Lightroom XMP file, I read this odd line (the photo has been taken at f/8.0, all tools agree with that)

``````   exif:ApertureValue="6/1"
``````

Apparently, `6/1` means `f/8.0`, but where is this correspondance defined? Is it Lightroom specific? defined by XMP?

Note: It's not only for science's sake, I am currently trying to recover for a hard disk crash where I lost all filenames

## 2 Answers

The Exif:ApertureValue is stored as an APEX value as mandated by various EXIF standards.

The APEX system is a way to calculate exposure and works using base-2 logarithms. The use of base-2 means a rise of one in the value equates to a doubling, which we know as `1 stop`; which makes it pretty handy for photographers if they're good with logarithms (which we don't use much nowadays). Do note, however, that 1 stop in aperture means doubling of the square of the F-number -- for example, going from f/2.8 to f/4 is 1 stop because 42 = 2 * 2.82 (approximately).

To convert from APEX to F-numbers, use the following equation:

ApertureValue (Av) = log2 (F-number)2 = 2 log2 (F-number)
⇒ F-number = 2Av / 2

To convert `f/8.0` to it's APEX value `6/1`...

`Log2(8) = 3`
`3 * 2 = 6` (or `6/1` as a fraction)

To convert the `6/1` APEX value back to f/8...

`6/2 = 3`
`2^3 = 8` giving us back f/8.0

See also:

• ExifTool: Exif Tags

• APEX—The Additive System of Photographic Exposure (PDF) – Contains tables and equations, but no calculation examples.

• JEITA CP-3451 Exif 2.2 (PDF) – Contains conversion equations.

This is a partial answer. According to this list Exif.Photo.ApertureValue is "The lens aperture. The unit is the APEX value." Which is confirmed by Wikipedia article on APEX. No idea how to make the conversion though.