if we specify the image size before, the screen doesn't flickering
authorAndreas Unterkircher <unki@netshadow.at>
Fri, 8 Jun 2007 15:22:47 +0000 (15:22 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Fri, 8 Jun 2007 15:22:47 +0000 (15:22 +0000)
when the next image gets loaded

git-svn-id: file:///var/lib/svn/phpfspot/trunk@53 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php
templates/single_photo.tpl

index c783939f894519dd00cbabdd07c44403e71763c1..e4ca4ffa9cde084ac3b7d6561e566a0e18e1994c 100644 (file)
@@ -103,7 +103,10 @@ class PHPFSPOT {
 
       $details = $this->get_photo_details($photo);
       $meta = $this->get_meta_informations($this->translate_path($details['directory_path']) ."/". $details['name']);
 
       $details = $this->get_photo_details($photo);
       $meta = $this->get_meta_informations($this->translate_path($details['directory_path']) ."/". $details['name']);
+      $info = getimagesize($this->translate_path($details['directory_path']) ."/thumbs/". $this->cfg->photo_width ."_". $details['name']);
 
 
+      $this->tmpl->assign('width', $info[0]);
+      $this->tmpl->assign('height', $info[1]);
       $this->tmpl->assign('c_date', $meta['DateTime']);
       $this->tmpl->assign('madewith', $meta['Make'] ." ". $meta['Model']);
       $this->tmpl->assign('image_name', $details['name']);
       $this->tmpl->assign('c_date', $meta['DateTime']);
       $this->tmpl->assign('madewith', $meta['Make'] ." ". $meta['Model']);
       $this->tmpl->assign('image_name', $details['name']);
index 716a78e27dba995ba4b058cc7cc0b41ceb52ef70..7935fefc4f458c1224e5334bb10017176c3c0cd7 100644 (file)
@@ -19,7 +19,7 @@
      { else }
       <a href="{$next_url}"> 
      { /if }
      { else }
       <a href="{$next_url}"> 
      { /if }
-       <img src="{$image_url}" />
+       <img src="{$image_url}" width="{$width}" height="{$height}" />
       </a>
      </td>
     </tr>
       </a>
      </td>
     </tr>