ExifReader
ExifReader copied to clipboard
Missing some tags
The tags ScaleFactor35efl, PitchAngle, and RollAngle are not being returned. I downloaded exif-reader on March 16, 2025.
The tags appear in the Mac App "ExifTool Reader Pro", which I downloaded within the past couple of weeks.
Hi! Do you have an example image I can test with?
Here is one with pitchAngle and rollAngle. https://www.dpreview.com/sample-galleries/4949897610/pentax-k-3-mark-iii-sample-gallery/0889795929
This Canon photo has FocalLength (for a cropped sensor) and ScaleFactor35efl where the two multiplied together give the focal length equivalent for 35mm (not included in the metadata).
Thank you for looking into this.
I'm still researching this. Unfortunately the angle values are in the MakerNotes tag which is proprietary, specific to each camera family or model, and often doesn't follow any standards or only party follows them. Therefore a heads up, it might be that this is just too much work and/or code for this library.
That being said, the values for pitch angle and roll angle in the first image seems to be zero. Do you have an image with non-zero values? It would be easier to work with.
Regarding the ScaleFactor35efl, it's not a value that is stored in the image and it has to be calculated. I'm not an expert here, but from my research it seems this value can be quite complex to calculate. At least for an image like this that has been resized and the original dimensions are not available anymore, and where the tag FocalLengthIn35mmFilm is not available. For when FocalLength and FocalLengthIn35mmFilm are available, the new release 4.28.0 will calculate ScaleFactorTo35mmEquivalent (ScaleFactor35efl). However, the FocalLengthIn35mmFilm tag is not available in the image you've attached so at least that image won't work I'm afraid (but I've seen many others work).
I don't know how to move forward from here so that's how far I can get with this for now, unless someone can contribute with some good insight on the subject. What would be needed in that case is a clear process to calculate this value from other values in the image. Where I got stuck with this specific example image is that it's resized and I can't find a way to get the original dimensions which, as far as I understand, are needed to be able to calculate the value without FocalLengthIn35mmFilm.
Sorry about the first image. The original file is buried under "i Details". The original file seems to be too large at 13MB jpg to upload. You should now see pitch and roll once you download it.
As for ScaleFactorTo35mmEquivalent, it seems like some cameras have tags for all three of focal length, the scale factor, and the effective focal length. Other cameras might only have two of the three.
I can see, for the Canon Ti5, the tag ScaleFactor35efl in EXIF Tool Pro and it as "Scale Factor To 35 mm Equivalent" in EXIF Tool. Since I don't know about the insides of metadata, I can't shed any light on where it might be hiding.
To be explicit: The Canon T5 image that I sent has the tags "FocalLength : 10.0 mm" "ScaleFactor35efl: 1.6" The calculations are baked into "ScaleFactor35efl". The effective focal length (not provided) is FocalLength * ScaleFactor35efl = 16mm.
I don't expect you to calculate ScaleFactor35efl from the sensor size, etc. For one thing, image stabilization, subject tracking, or faked alternative focal lengths can make it impossible (I'm thinking iPhones). I apologize for sending a down-sized photo.
Here is another photo from a different camera company (Leica Q3) with PitchAngle and RollAngle. Look under "i Details" for the full sized photo. https://www.dpreview.com/sample-galleries/9356330178/leica-q3-sample-gallery/4680905668
DJI drones photos have GimbalPitchDegree and GimbalRollDegree.
Aha, now I found the original of the first image, thanks. It still has pitch and roll values that are zero though (checking in ExifTool). I'm trying to figure out how exactly these values are stored in the binary data and it's easier to see non-zero values because there are generally a lot of zeroes. :-) Since they are located in the proprietary MakerNotes tag there aren't any official specifications (that I've found at least), just other people that have reverse engineered it which aren't always that specific (and this one can also be stored in two different ways...).
For the new Leica Q3 image, ExifReader already shows both pitch angle and roll angle. This is because they are located in the XMP part of the metadata instead of in MakerNotes.
For the ScaleFactor35efl, it's always calculated from other values. At least that's how I understand it from the ExifTool documentation and forum. They do some tricks to be able to do this, like checking camera models and stuff. I think it would be hard to replicate fully. If you have the command line version you can see that it says [Composite] on that line if you run with exiftool -G <image>. All the [Composite] values are calculated from other values.
(By the way, the Leica Q3 photo now has a ScaleFactorTo35mmEquivalent with the latest ExifReader version, 4.28.0, but as I said that's just because it has both FocalLength and FocalLengthIn35mmFilm.)
The Pentax K-III photo of boats has Camera Orientation : Horizontal (normal) Roll Angle : 1 Pitch Angle : 37.5 Focal Length In 35mm Format : 23 mm from "Phil's EXIF Reader". Not zeros. These values are correct.
I found that the Pentax K-III records pitch and roll from https://exiftool.org/TagNames/Pentax.html so I'm surprised that EXIFtool returns zeros.
We are using different EXIF tools and finding some different absent, existing, or calculated tags. Looks like you are using the original open-source Harvey's command-line EXIF tool. My Mac would not allow me to download it. I am using "Phil's EXIF reader" https://apps.apple.com/us/app/exiftool-reader/id1636199770?mt=12 and "Phil's EXIF Reader Pro" https://apps.apple.com/de/app/exiftool-reader-pro/id1640692796?mt=12. Their version numbers are like 1.0.X.
I downloaded the latest version, 13.26 (I apparently had 12.76 installed), and it now shows the correct numbers that you list. That should help a bit. Thanks for pointing it out.
Here is a PR that will extract RollAngle and PitchAngle: https://github.com/mattiasw/ExifReader/pull/498 If you can, please try it out.
Hi Mattias,
I am not very good with Github. I hope that I did this correctly.
I am testing this on the boat photo DPR_Carey_Rose_IMGP0298.jpg
I copied https://github.com/mattiasw/ExifReader/blob/488-pentax-tags/dist/exif-reader.js https://github.com/mattiasw/ExifReader/blob/488-pentax-tags/dist/exif-reader.js.map to my directory /js
My program is reading in: FocalLength35efl 23 mm PitchAngle -75 (I use tilt = pitch + 90 = 15 degrees) RollAngle -2 The transformed image does not look right.
My ExifTool Mac app is reporting FocalLength35efl 23 mm PitchAngle 37.5 RollAngle 1 and using those values, the transformed image looks perfect.
I am attaching the Excel file that ExifTool created. The boat photo is the second entry.
Just to make sure: Are you doing this for the Pentax model K3-III, using FLOAT? There is another model that only uses INT8 for roll and pitch, if I remember correctly.
I hope that this is useful. Thank you for updating the Pentax camera K3-III.
Thanks, Tanya
On Fri, Apr 18, 2025 at 2:11 PM Mattias Wallander @.***> wrote:
Here is a PR that will extract RollAngle and PitchAngle: #498 https://github.com/mattiasw/ExifReader/pull/498 If you can, please try it out.
— Reply to this email directly, view it on GitHub https://github.com/mattiasw/ExifReader/issues/488#issuecomment-2815957508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJCNVGAJRDJ7FTCTNLFKN322E54BAVCNFSM6AAAAABZXISXBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJVHE2TONJQHA . You are receiving this because you authored the thread.Message ID: @.***> mattiasw left a comment (mattiasw/ExifReader#488) https://github.com/mattiasw/ExifReader/issues/488#issuecomment-2815957508
Here is a PR that will extract RollAngle and PitchAngle: #498 https://github.com/mattiasw/ExifReader/pull/498 If you can, please try it out.
— Reply to this email directly, view it on GitHub https://github.com/mattiasw/ExifReader/issues/488#issuecomment-2815957508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJCNVGAJRDJ7FTCTNLFKN322E54BAVCNFSM6AAAAABZXISXBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJVHE2TONJQHA . You are receiving this because you authored the thread.Message ID: @.***>
You are actually getting the correct values. -75 and -2 are the values that are recorded in the image and those are available in the value property of the tag. To view a more user-friendly presentation of the values, have a look at the description property which have been converted for you (in this case to 37.5 and 1). Why these values are different I can't answer, I just added the same conversion that others do.
By the way, this value/description split is the same for all tags. Sometimes they will be the same and other times there have been some extra processing to help the user.
I released the PR as 4.30.0.