aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-04-03 20:58:14 +0000
committerplegall <plg@piwigo.org>2012-04-03 20:58:14 +0000
commitc137a52c154f47f6de970212dfedc425c181fc21 (patch)
tree432d69152a49b85160c78065cfd42bac11e478a5 /admin
parent4654f707e016785321c1d1ec4c835918eaae9eea (diff)
coding guidelines: indentation is made of spaces, not tabs
git-svn-id: http://piwigo.org/svn/trunk@13882 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/image.class.php23
1 files changed, 12 insertions, 11 deletions
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)