Skip to content

Commit

Permalink
Merge pull request thibaud-rohmer#332 from gboudreau/master
Browse files Browse the repository at this point in the history
Yep, I agree, it's a useful piece of information.
  • Loading branch information
thibaud-rohmer authored Feb 7, 2017
2 parents abd9c7a + d85185b commit b28b71a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/classes/Exif.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public function __construct($file=null){
}
}
}

/// File size is not an EXIF property, but it's still relevant to the end user
$this->exif['File Size'] = number_format(filesize($file)/1024/1024, 1) . " " . "MB";
}

/**
Expand All @@ -108,6 +111,8 @@ private function init_wanted(){
$this->wanted['Aperture'][] = 'FNumber';
$this->wanted['ISO'][] = 'ISOSpeedRatings';
$this->wanted['Original Date'][]= 'DateTimeOriginal';
$this->wanted['Width'][] = 'ExifImageWidth';
$this->wanted['Height'][] = 'ExifImageLength';
}

/**
Expand Down Expand Up @@ -166,7 +171,7 @@ private function parse_exif($d,$raw_exif){

/// Values that don't need to be processed
$untouched=array('FileName','Model','Make','ISOSpeedRatings',
'DateTimeOriginal', 'DateTimeDigitized', 'DateTime');
'DateTimeOriginal', 'DateTimeDigitized', 'DateTime', 'ExifImageWidth', 'ExifImageLength');

/// If value doesn't need to be processed, return it
if(in_array($d,$untouched))
Expand Down

0 comments on commit b28b71a

Please sign in to comment.