[limb-svn] r6311 - 3.x/trunk/limb/imagekit/src
svn at limb-project.com
svn at limb-project.com
Tue Sep 18 13:16:09 MSD 2007
Author: tony
Date: 2007-09-18 13:16:08 +0400 (Tue, 18 Sep 2007)
New Revision: 6311
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6311
Modified:
3.x/trunk/limb/imagekit/src/lmbImageResizer.class.php
Log:
-- lmbImageResizer :: resize() method also can accept array with ImageLibrary params now
Modified: 3.x/trunk/limb/imagekit/src/lmbImageResizer.class.php
===================================================================
--- 3.x/trunk/limb/imagekit/src/lmbImageResizer.class.php 2007-09-18 07:34:44 UTC (rev 6310)
+++ 3.x/trunk/limb/imagekit/src/lmbImageResizer.class.php 2007-09-18 09:16:08 UTC (rev 6311)
@@ -40,7 +40,7 @@
return $this->mime_type;
}
- function resize($max_size)
+ function resize($size)
{
$input_file = $this->getFilePath();
$tmp_file = lmbFs :: generateTmpFile();
@@ -60,7 +60,11 @@
$image_library->setOutputFile($output_file);
$image_library->setOutputType($output_file_type);
- $image_library->resize(array('max_dimension' => $max_size));
+ if(!is_array($size))
+ $image_library->resize(array('max_dimension' => $size));
+ else
+ $image_library->resize($size);
+
$image_library->commit();
}
catch(lmbException $e)
@@ -81,4 +85,4 @@
unlink($this->filepath);
}
}
-?>
\ No newline at end of file
+?>
More information about the limb-svn
mailing list