summaryrefslogtreecommitdiffstats
path: root/phpfspot_img.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:47:10 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:47:10 +0000
commit2a7482575ed5d5d010ca6e54d0b902c682132cd5 (patch)
tree09c101f05167eb6a267111269271898a02f2f2d3 /phpfspot_img.php
parent81024014bf2fabc1c606edcd8b6441e67ffc824f (diff)
don't recreate already existing thumbnails
git-svn-id: file:///var/lib/svn/phpfspot/trunk@18 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot_img.php')
-rw-r--r--phpfspot_img.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpfspot_img.php b/phpfspot_img.php
index 3a2a322..ec6c7db 100644
--- a/phpfspot_img.php
+++ b/phpfspot_img.php
@@ -52,6 +52,10 @@ class PHPFSPOT_IMG {
public function resize_image($image, $width)
{
+ // if thumbnail already exists, don't recreate it
+ if(file_exists(dirname($image) ."/thumbs/". $width ."_". basename($image)))
+ return;
+
$src_img = @imagecreatefromjpeg($image);
if($src_img)