diff options
-rw-r--r-- | phpfspot.class.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 3b4a62e..b375ffd 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -483,8 +483,11 @@ class PHPFSPOT { $thumb_path = $this->get_thumb_path($this->cfg->photo_width, $photo); } + /* get mime-type, height and width from the original photo */ + $info = getimagesize($orig_path); + /* get EXIF information if JPEG */ - if($details['mime'] == "image/jpeg") { + if($info['mime'] == "image/jpeg") { $meta = $this->get_meta_informations($orig_path); } @@ -492,7 +495,6 @@ class PHPFSPOT { if(isset($meta['ExifImageWidth'])) { $meta_res = $meta['ExifImageWidth'] ."x". $meta['ExifImageLength']; } else { - $info = getimagesize($orig_path); $meta_res = $info[0] ."x". $info[1]; } @@ -516,13 +518,13 @@ class PHPFSPOT { return; } - $info = getimagesize($thumb_path); + $info_thumb = getimagesize($thumb_path); $this->tmpl->assign('description', $details['description']); $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename')); - $this->tmpl->assign('width', $info[0]); - $this->tmpl->assign('height', $info[1]); + $this->tmpl->assign('width', $info_thumb[0]); + $this->tmpl->assign('height', $info_thumb[1]); $this->tmpl->assign('ExifMadeOn', $meta_date); $this->tmpl->assign('ExifMadeWith', $meta_make); $this->tmpl->assign('ExifOrigResolution', $meta_res); |