Ticket #16106: image.diff
File image.diff, 1.0 KB (added by , 13 years ago) |
---|
-
image.php
182 182 } 183 183 184 184 /** 185 * Convert the exif ISO Speed Ratings to a string. 186 * 187 * @since 3.0.5 188 * 189 * @param $iso 190 * @return str 191 */ 192 function wp_exif_isospeedratings2str($iso) { 193 if( is_array( $iso ) ) 194 $iso = implode( ',', $iso ); 195 196 return utf8_encode( trim( $iso ) ); 197 } 198 199 /** 185 200 * Get extended image metadata, exif or iptc as available. 186 201 * 187 202 * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso … … 297 312 if ( ! empty($exif['FocalLength'] ) ) 298 313 $meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] ); 299 314 if ( ! empty($exif['ISOSpeedRatings'] ) ) 300 $meta['iso'] = utf8_encode( trim( $exif['ISOSpeedRatings'] ));315 $meta['iso'] = wp_exif_isospeedratings2str( $exif['ISOSpeedRatings'] ); 301 316 if ( ! empty($exif['ExposureTime'] ) ) 302 317 $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] ); 303 318 }