ExifTool Forum

General => Metadata => Topic started by: 7tonin on February 28, 2021, 04:49:08 AM

Title: Croping a picture - how to update crop factor ?
Post by: 7tonin on February 28, 2021, 04:49:08 AM
Hi,
a picture file is croped from ImageSize: 5152x2904 to ImageSize: 640x480
All metadata are copied, but how to update crop factor? field of view?

Title: Re: Croping a picture - how to update crop factor ?
Post by: 7tonin on February 28, 2021, 04:58:31 PM
I'm happy with this formula, which is the inverse ratio of the diagonals: ird = SQRT( ( 5152 ² + 2904 ² ) / ( 640 ² + 480 ² ) ) = 6.978...
Then read equivalent focal length
exiftool -FocalLengthIn35mmFormat filename.jpg
Focal Length In 35mm Format     : 150 mm


calculate 150 * ird = 150 * 6.978... = 1046.80...

Apply
exiftool -FocalLengthIn35mmFormat=1046.80 filename.jpg

Then -FOV (field of view) is updated, and maybe some others.
Title: Re: Croping a picture - how to update crop factor ?
Post by: 7tonin on February 28, 2021, 05:20:18 PM
The follogwing fields are updated (and maybe some others):
-FocalLengthIn35mmFormat
-ScaleFactor35efl
-CircleOfConfusion
-FOV
-FocalLength35efl
-HyperfocalDistance



fieldfromto
-FocalLengthIn35mmFormat150 mm1047 mm
-ScaleFactor35efl4.430.8
-CircleOfConfusion0.007 mm0.001 mm
-FOV13.7 deg2.0 deg
-FocalLength35efl34.0 mm (35 mm equivalent: 150.0 mm)34.0 mm (35 mm equivalent: 1047.0 mm)
-HyperfocalDistance60.62 m423.13 m
Title: Re: Croping a picture - how to update crop factor ?
Post by: StarGeek on February 28, 2021, 08:07:38 PM
You can check the Composite tags page (https://exiftool.org/TagNames/Composite.html) to see what these tags are derived from.
Title: Re: Croping a picture - how to update crop factor ?
Post by: 7tonin on March 01, 2021, 06:48:03 AM
Thank you very much !
By the way, I made a mistake in my ird value calculation. But my explaination is still ok.