X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_img.php;h=bc8d3d11badc4b22067eba044e8c15deaf50c8f4;hp=461f5c61a253083db259baca67b330007b1e0668;hb=429044ea83a1b151ad5b8b2e32a9886774bca2d8;hpb=1bd68ab30d8e8a95581ff26da1f8fadf12ce5d8d diff --git a/phpfspot_img.php b/phpfspot_img.php index 461f5c6..bc8d3d1 100644 --- a/phpfspot_img.php +++ b/phpfspot_img.php @@ -29,7 +29,6 @@ require_once "phpfspot.class.php"; * * handles phpfspot's photos. It will output either the photo binaries * or can also show error messages as a on-the-fly generated picture. - * * @package phpfspot */ class PHPFSPOT_IMG { @@ -79,7 +78,7 @@ class PHPFSPOT_IMG { /* no width specified - show photo in its original size */ if($width == 0) { - $fullpath = $this->parent->translate_path($this->parent->parse_uri($details['uri'])); + $fullpath = $this->parent->translate_path($this->parent->parse_uri($details['uri'], 'fullpath')); } /* show thumbnail */ else { @@ -101,10 +100,8 @@ class PHPFSPOT_IMG { if(!is_readable($fullpath)) { $this->parent->showTextImage("File ". basename($fullpath) ." is not readable. Check the permissions"); return; - } - - $tmp = getimagesize($fullpath); - $mime = $tmp['mime']; + } + $mime = $this->parent->get_mime_info($fullpath); if(!$this->parent->checkifImageSupported($mime)) { $this->parent->showTextImage("Unsupported Image Type");