EXIF field FocalLengthIn35mmFilm has meaningless value

Using an iPhone 8 and iOS 16.7.5, when taking a picture, the EXIF data I'm getting does not seem to make sense.

I am getting:

FocalLength: 399/100
FocalLengthIn35mmFilm: 177

The FocalLength EXIF field is correct since iPhone 8's back lens does have a focal length of 3.99mm. The FocalLengthIn35mmFilm value, however, is wrong. The actual value is (obviously) much less, probably between 23 and 27mm (ish).

Could this be a bug, or may FocalLengthIn35mmFilm is expressed in a unit which I am not aware of?

Thanks for your help.

How exactly are you retrieving those values?

This does work correctly in general, e.g. I've just checked on my iPhone XS running iOS 17 and got 4.2mm native and 26mm equivalent. Have you tested on any other devices?

Thanks for your reply.

The code I am using is similar to the following (captureToFile function):

https://github.com/flutter/packages/blob/d63629d7e2dad0c9b2f848d8ede398ef2e801cc9/packages/camera/camera_avfoundation/ios/Classes/FLTCam.m#L260

Any idea about what could go wrong?

All other EXIF values I could inspect make sense, and there are many of them.

Unfortunately, I don't have another iPhone at hand.

The same issue can be observed with an iPhone 7 and iOS 15.8, using the same code.

I made some progress, and the issue can be reproduced programmatically when using lower resolutions.

That is, when a picture is taken at full resolution (3024x4032), the EXIF aspect ratio is the expected one, 28mm.

However, as you lower the resolution, the FocalLengthIn35mmFilm value increases, linearly: 32, 64, 96, 177 (for 480x640 pictures) and 311 (for 352x288 pictures).

The increase is indeed linear, meaning that I use the image dimension and divide the value to get the real focal distance - it works.

Is this behavior expected? This is weird, because the focal length should not change with the resolution - should it?

EXIF field FocalLengthIn35mmFilm has meaningless value
 
 
Q