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
This commit is contained in:
rvelices
2012-02-05 14:58:14 +00:00
parent cb36388114
commit 8d86e7b399
3 changed files with 38 additions and 45 deletions

View File

@@ -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);
}