summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-03-30 10:02:47 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-03-30 10:02:47 +0200
commit10509074c0b749564f0a0327f3b11fda994d36c1 (patch)
tree557555fc2e1e9c5fb44036d8ece14551176786ff
parentfb7df61d1e9b77181a69169311133df355e66eea (diff)
issue113, fix getting EXIF data right in time for the single-photo view
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r--phpfspot.class.php12
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);