You are here

function imagepicker_get_exifinfo in Image Picker 7

Same name and namespace in other branches
  1. 6.2 imagepicker.functions.inc \imagepicker_get_exifinfo()

Function to fetch exif info

Parameters

$image: Required image with full path

Return value

Returns the exif info

2 calls to imagepicker_get_exifinfo()
imagepicker_adminview in ./imagepicker.admin.inc
imagepicker_userview in ./imagepicker.user.inc

File

./imagepicker.functions.inc, line 2907
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function imagepicker_get_exifinfo($image) {
  $exif = '';
  if (file_exists($image)) {
    if (imagepicker_exif_check(TRUE) && imagepicker_variable_get('imagepicker_exifinfo_enable', 0)) {
      $exif = exif_read_data($image, 0, TRUE);
    }
    else {
      $extprog = imagepicker_variable_get('imagepicker_exifinfo_external', '');
      if ($extprog) {
        $exif = shell_exec("{$extprog} {$image}");
      }
    }
  }
  return $exif;
}