WordPress.org

Make WordPress Core

Ticket #22259: image.php.patch

File image.php.patch, 1.0 KB (added by jcakec, 6 years ago)
  • wp-admin/includes/image.php

     
    254254                if ( ! empty($exif['DateTimeDigitized'] ) )
    255255                        $meta['created_timestamp'] = wp_exif_date2ts($exif['DateTimeDigitized'] );
    256256                if ( ! empty($exif['FocalLength'] ) )
    257                         $meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] );
     257                        $meta['focal_length'] = round( wp_exif_frac2dec( $exif['FocalLength'] ), 4 );
    258258                if ( ! empty($exif['ISOSpeedRatings'] ) ) {
    259259                        $meta['iso'] = is_array( $exif['ISOSpeedRatings'] ) ? reset( $exif['ISOSpeedRatings'] ) : $exif['ISOSpeedRatings'];
    260260                        $meta['iso'] = trim( $meta['iso'] );
    261261                }
    262262                if ( ! empty($exif['ExposureTime'] ) )
    263                         $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] );
     263                        $meta['shutter_speed'] = round( wp_exif_frac2dec( $exif['ExposureTime'] ), 4 );
    264264        }
    265265
    266266        foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) {