diff options
-rw-r--r-- | phpfspot.class.php | 9 |
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)) { |