• Resolved iophtgrphs

    (@iophtgrphs)


    Can’t figure out how to get the Focal Length information. If I got it right from the EXIF specifications it is a computed value, because if I just use {exif:FocalLength} then I get something like “250/1”, but {exif:computed>FocalLength} doesn’t give any result.

    I also had a hard time to get the ISO value, till I tried {exif:ISOSpeedRatings} instead of {exif:ISOSpeed} or any other with “ISO”. Maybe you can just add this to the available Metadata. 🙂

    Else, this plugin is exactly what I needed to get the EXIF-data into the post_content for further use. Thank you.

    https://wordpress.org/plugins/image-metadata-cruncher/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter iophtgrphs

    (@iophtgrphs)

    Solved it:

    To get the calculated value of the focal length like it is done at the image.php of wordpress with “wp_exif_frac2dec($str), I just added:

    if($key == "FocalLength“) {
    	$value = wp_exif_frac2dec($value);
    }

    after the line:

    $value = str_replace("", '', $value);

    within the “image-metadata-cruncher.php”.

    So it seems this can’t be done in the plugin itself but requires modification of the WordPress image.php file. How disappointing.

    Hi iophtgrphs,

    thank you very much for sharing this trick! It works for me very well.

    Khürt: Nope, you have to modify the file “image-metadata-cruncher.php” of the plugin.

    Best regards!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Focal Length ISO’ is closed to new replies.