diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-05-02 04:29:56 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-05-02 04:29:56 +0000 |
commit | 40a4dd63f09e96550239c562730ab99e29760bc0 (patch) | |
tree | 34aacf7ee362c58f84ade72f26aa18e3bfecfe81 /admin/include/image.class.php | |
parent | 642d757bd4644e8596ee17bc57d674a85a38c4ff (diff) |
multi size:
- fix external imagick issues when rotation was required
- fix: derivative were generated continuosly until a first save performed in the admin screen
- added sharpen param in the new config screen
- increased the sharpen range (10% is less than before)
git-svn-id: http://piwigo.org/svn/trunk@14649 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/image.class.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/admin/include/image.class.php b/admin/include/image.class.php index 062341913..53516f62d 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -287,8 +287,8 @@ 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 48-10 + $amount = round(abs(-48 + ($amount * 0.38)), 2); $matrix = array( array(-1, -1, -1), @@ -549,6 +549,12 @@ class image_ext_imagick implements imageInterface function rotate($rotation) { + if ($rotation==90 || $rotation==270) + { + $tmp = $this->width; + $this->width = $this->height; + $this->height = $tmp; + } $this->add_command('rotate', -$rotation); $this->add_command('orient', 'top-left'); return true; @@ -562,7 +568,6 @@ class image_ext_imagick implements imageInterface function resize($width, $height) { - $this->add_command('interlace', 'line'); $this->add_command('filter', 'Lanczos'); $this->add_command('resize', $width.'x'.$height.'!'); return true; @@ -595,6 +600,8 @@ class image_ext_imagick implements imageInterface function write($destination_filepath) { + $this->add_command('interlace', 'line'); // progressive rendering + $exec = $this->imagickdir.'convert'; $exec .= ' "'.realpath($this->source_filepath).'"'; @@ -611,7 +618,11 @@ class image_ext_imagick implements imageInterface $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"'; @exec($exec, $returnarray); - //echo($exec); + ilog($exec); + if (is_array($returnarray) && (count($returnarray)>0) ) + { + ilog($returnarray); + } return is_array($returnarray); } } |