summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-07 09:36:08 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-07 09:36:08 +0000
commit169c44bec7e0f9d00be93ace7bfc94deff7da0cd (patch)
tree9b7d6f8be372b856b8f111a03a2426cf15ae5f1c /phpfspot.class.php
parent3233232bc555521ce6bd45aab238190bce2585a5 (diff)
issue28, use getimagesize if no exif data is available
git-svn-id: file:///var/lib/svn/phpfspot/trunk@173 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 4b304a1..0047f90 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -177,9 +177,16 @@ class PHPFSPOT {
$meta = $this->get_meta_informations($orig_path);
+ /* If EXIF data are available, use them */
+ if(isset($meta['ExifImageWidth'])) {
+ $meta_res = $meta['ExifImageWidth'] ."x". $meta['ExifImageLength'];
+ } else {
+ $info = getimagesize($orig_path);
+ $meta_res = $info[0] ."x". $info[1];
+ }
+
$meta_date = isset($meta['FileDateTime']) ? strftime("%a %x %X", $meta['FileDateTime']) : "n/a";
$meta_make = isset($meta['Make']) ? $meta['Make'] ." ". $meta['Model'] : "n/a";
- $meta_res = isset($meta['ExifImageWidth']) ? $meta['ExifImageWidth'] ."x". $meta['ExifImageLength'] : "n/a";
$meta_size = isset($meta['FileSize']) ? round($meta['FileSize']/1024, 1) ."kbyte" : "n/a";
if(file_exists($thumb_path)) {