Automatically change focal length

by Stako   Last Updated October 05, 2019 04:18 AM

I have these focal length conversion factors, I need to put them in the code so that they do the automatic conversion. How should I do?

Full frame 35mm = 1.0x
APS-H  (Canon)= 1.3x
APS-C  general (Nikon-Sony-Pentax) = 1.5x
APS-C  (Canon)= 1.6x
4/3” = 2.0x
1” = 2.7x
2/3” = 3.9x
1/1.7” = 4.5x
1/1.8” = 4.8x
1/2.3” = 5.6x 
1/2.5” = 6.0x
1/2.7” = 6.4x
1/3.0” = 7.2x
1/3.2” = 7.6x
1/3.6” = 8.6x

This is the function in functions.php child by this WordPress plugin: https://wordpress.org/plugins/thesography/

function change_focal_length($content) {
    if (isset($content['focal_length']))
        $content['focal_length'] = '35mm';

    return $content;
}
add_filter('exifography_display_exif','change_focal_length');
Tags : focal-length


Related Questions


Updated July 10, 2019 02:18 AM

Updated June 23, 2015 02:07 AM

Updated October 23, 2016 09:07 AM

Updated August 21, 2016 08:07 AM

Updated March 17, 2017 16:18 PM