From: Michael J. Rubinsky Date: Fri, 29 May 2009 17:39:45 +0000 (-0400) Subject: Only iterate over images once X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=454d8a5acccdc1f45b302abb1abe3d044755b88e;p=horde.git Only iterate over images once --- diff --git a/framework/Image/lib/Horde/Image/Effect/Im/PhotoStack.php b/framework/Image/lib/Horde/Image/Effect/Im/PhotoStack.php index baafc8985..c0e154366 100644 --- a/framework/Image/lib/Horde/Image/Effect/Im/PhotoStack.php +++ b/framework/Image/lib/Horde/Image/Effect/Im/PhotoStack.php @@ -76,13 +76,11 @@ class Horde_Image_Effect_Im_PhotoStack extends Horde_Image_Effect $this->_params['resize_height'], true); $size = $this->_params['images'][$cnt - 1]->getDimensions(); - for ($i = 0; $i < $cnt; $i++) { - $this->_params['images'][$i]->resize($size['height'], $size['width'], false); - } $xo = $yo = (count($this->_params['images'])) * $this->_params['offset']; $ops = ''; $haveBottom = false; foreach ($this->_params['images'] as $image) { + $image->resize($size['height'], $size['width'], false); $xo -= $this->_params['offset']; $yo -= $this->_params['offset'];