Adobe Lightroom SQLite Format

The Adobe Lightroom Catalog is a SQLite database. I have an app where I access some of the information about images.

I’m conversant with database normalization but have discovered something I just can’t explain.
The shutter speed records for an image is stored as a power of 2. In other words 1/250 of a second is stored in the database as 6.965784

Any explanations?

thanks

How is 6.96 a power of 2?

According to Google AI:

The numeric value 6.965784 is a stored value in the Adobe Lightroom Classic SQLite database, representing a shutter speed, rather than a human-readable display format. This value is the logarithm base 2 of the shutter speed in seconds.

for that value it says that is 1/125 not 1/250.

2^6.965784 = 124.99

yeah, sorry. just my mistake I mean 125

What exactly is what you need?

Edit: If you want to convert 125 to the value saved in the database

Var d as Double
d = log(125)/log(2) //6.96578428466...

but if you want to know why they save it like that, you may need to ask in Adobe forum/support.

My question is simply why would Adobe store the data like this. How does this make processing the Database more efficient.

I have the code working that I need. I’m just wondering why did Adobe do it like this.

:man_shrugging: because they want to?

It’s not like they build Lightroom with the intention of third parties poking around the catalog. If it works… it works.

You could also ask the Adobe community who might know more?

Similarly, white-balance sliders are in chunks-of-kelvin instead of steps-of-warmth merely as a software design choice… I have been educated that steps-of-warmth would make those sliders so much easier to use.

2 Likes

Apparently

“camera shutter speeds are effectively arranged on a logarithmic scale, similar to f-stops for aperture and ISO settings”

This is a camera “property” (photo shooting), not a computer stuff…

It’s literally just powers of two steps, lined up with photographic stops. :wink: