You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by sh...@apache.org on 2010/01/25 23:33:43 UTC

svn commit: r903012 - /incubator/olio/webapp/php/trunk/classes/ImageUtil.php

Author: shanti
Date: Mon Jan 25 23:33:43 2010
New Revision: 903012

URL: http://svn.apache.org/viewvc?rev=903012&view=rev
Log:
OLIO-140

Modified:
    incubator/olio/webapp/php/trunk/classes/ImageUtil.php

Modified: incubator/olio/webapp/php/trunk/classes/ImageUtil.php
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/classes/ImageUtil.php?rev=903012&r1=903011&r2=903012&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/classes/ImageUtil.php (original)
+++ incubator/olio/webapp/php/trunk/classes/ImageUtil.php Mon Jan 25 23:33:43 2010
@@ -19,6 +19,7 @@
     
 class ImageUtil
 {
+
     static function createThumb($name,$thumbname,$new_w,$new_h){
         $system=explode('.',$name);
         $ext=$system[1];
@@ -53,14 +54,15 @@
         imagedestroy($src_img); 
     }
 
-    function fastimagecopyresampled (&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 3) {
+}
+    function fastimagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 3) {
       // Plug-and-Play fastimagecopyresampled function replaces much slower imagecopyresampled.
       // Just include this function and change all "imagecopyresampled" references to "fastimagecopyresampled".
       // Typically from 30 to 60 times faster when reducing high resolution images down to thumbnail size using the default quality setting.
       // Author: Tim Eckel - Date: 09/07/07 - Version: 1.1 - Project: FreeRingers.net - Freely distributable - These comments must remain.
       //
       // Optional "quality" parameter (defaults is 3). Fractional values are allowed, for example
-    1.5. Must be greater than zero.
+     // 1.5. Must be greater than zero.
       // Between 0 and 1 = Fast, but mosaic results, closer to 0 increases the mosaic effect.
       // 1 = Up to 350 times faster. Poor results, looks very similar to imagecopyresized.
       // 2 = Up to 95 times faster.  Images appear a little sharp, some prefer this over a quality of 3.
@@ -77,5 +79,4 @@
       } else imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
       return true;
     }
-}
 ?>