From c137a52c154f47f6de970212dfedc425c181fc21 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 3 Apr 2012 20:58:14 +0000 Subject: coding guidelines: indentation is made of spaces, not tabs git-svn-id: http://piwigo.org/svn/trunk@13882 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/image.class.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'admin/include') diff --git a/admin/include/image.class.php b/admin/include/image.class.php index 61b1ab277..062341913 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -287,15 +287,14 @@ class pwg_image /** Returns a normalized convolution kernel for sharpening*/ static function get_sharpen_matrix($amount) { - // Amount should be in the range of 28-10 - $amount = round(abs(-28 + ($amount * 0.18)), 2); + // Amount should be in the range of 28-10 + $amount = round(abs(-28 + ($amount * 0.18)), 2); - $matrix = array - ( - array(-1, -1, -1), - array(-1, $amount, -1), - array(-1, -1, -1), - ); + $matrix = array( + array(-1, -1, -1), + array(-1, $amount, -1), + array(-1, -1, -1), + ); $norm = array_sum(array_map('array_sum', $matrix)); @@ -303,10 +302,12 @@ class pwg_image { $line = & $matrix[$i]; for ($j=0; $j<3; $j++) + { $line[$j] /= $norm; + } } - return $matrix; + return $matrix; } private function get_resize_result($destination_filepath, $width, $height, $time=null) @@ -460,7 +461,7 @@ class image_imagick implements imageInterface function sharpen($amount) { $m = pwg_image::get_sharpen_matrix($amount); - return $this->image->convolveImage($m); + return $this->image->convolveImage($m); } function compose($overlay, $x, $y, $opacity) @@ -729,7 +730,7 @@ class image_gd implements imageInterface function sharpen($amount) { $m = pwg_image::get_sharpen_matrix($amount); - return imageconvolution($this->image, $m, 1, 0); + return imageconvolution($this->image, $m, 1, 0); } function compose($overlay, $x, $y, $opacity) -- cgit v1.2.3