underbar.png
[phpfspot.git] / phpfspot_img.php
index 461f5c61a253083db259baca67b330007b1e0668..bc8d3d11badc4b22067eba044e8c15deaf50c8f4 100644 (file)
@@ -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.
  *
  * 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 {
  * @package phpfspot
  */
 class PHPFSPOT_IMG {
@@ -79,7 +78,7 @@ class PHPFSPOT_IMG {
 
       /* no width specified - show photo in its original size */
       if($width == 0) {
 
       /* 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 {
       }
       /* 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;
       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");
 
       if(!$this->parent->checkifImageSupported($mime)) {
          $this->parent->showTextImage("Unsupported Image Type");