diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-02-05 14:58:14 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-02-05 14:58:14 +0000 |
commit | 8d86e7b399fbda576306453c332cd9daeb44bdde (patch) | |
tree | 4288b52b6052b9aeed9704e3ed12f12426c187d8 /admin/include | |
parent | cb36388114b6d7b35a71243c5ad23854da12fe33 (diff) |
multisize
- watermarks loaded also from local dir
- fix/simplify algo for cropping
- imagick use scaleImage (fast) before resizeImage (slow) if the original is a lot bigger than the requested size
git-svn-id: http://piwigo.org/svn/trunk@13035 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/image.class.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/admin/include/image.class.php b/admin/include/image.class.php index 19b936afc..86ef35a69 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -423,6 +423,11 @@ class image_imagick implements imageInterface function resize($width, $height) { $this->image->setInterlaceScheme(Imagick::INTERLACE_LINE); + if ($this->get_width()%2 == 0 && $this->get_height()%2 == 0 + && $this->get_width() > 3*$width) + { + $this->image->scaleImage($this->get_width()/2, $this->get_height()/2); + } return $this->image->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 0.9); } |