diff options
author | Joe Lapp <joe.lapp@pobox.com> | 2005-08-23 18:42:04 +0200 |
---|---|---|
committer | Joe Lapp <joe.lapp@pobox.com> | 2005-08-23 18:42:04 +0200 |
commit | 6db72d46c4c014dbd379899855d09a7b5810630c (patch) | |
tree | b4ef60267184c05a17ee1992f7bde1e48a3ab118 /inc | |
parent | e68c51bac31594213f669a7700b21ac8b87df959 (diff) | |
download | rpg-6db72d46c4c014dbd379899855d09a7b5810630c.tar.gz rpg-6db72d46c4c014dbd379899855d09a7b5810630c.tar.bz2 |
added simple.shutterspeed to JpegMeta
darcs-hash:20050823164204-46f60-5c79fbd04d9bc5ce4a6dad13f93b8383d9fd8b77.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/JpegMeta.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 1e2748975..957d03671 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -147,6 +147,8 @@ class JpegMeta return $this->getRawInfo(); }elseif(strtolower($field) == 'simple.title'){ $info = $this->getTitle(); + }elseif(strtolower($field) == 'simple.shutterspeed'){ + $info = $this->getShutterSpeed(); }else{ $info = $this->getExifField($field); } @@ -249,6 +251,25 @@ class JpegMeta } /** + * Return shutter speed as a ratio + * + * @author Joe Lapp <joe.lapp@pobox.com> + */ + function getShutterSpeed() + { + if (!isset($this->_info['exif'])) { + $this->_parseMarkerExif(); + } + if(!isset($this->_info['exif']['ExposureTime'])){ + return ''; + } + + $field = $this->_info['exif']['ExposureTime']; + if($field['den'] == 1) return $field['num']; + return $field['num'].'/'.$field['den']; + } + + /** * Return an EXIF field * * @author Sebastian Delmont <sdelmont@zonageek.com> |