From 08ee3a40794fa9012f29b7ad3bea83f500cb244b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 8 Jul 2010 10:16:43 -0400 Subject: [PATCH] these don't return PEAR_Error --- framework/Image/lib/Horde/Image/Gd.php | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/framework/Image/lib/Horde/Image/Gd.php b/framework/Image/lib/Horde/Image/Gd.php index a4537e430..711ff7186 100644 --- a/framework/Image/lib/Horde/Image/Gd.php +++ b/framework/Image/lib/Horde/Image/Gd.php @@ -831,23 +831,9 @@ class Horde_Image_Gd extends Horde_Image_Base for ($x = 0; $x < $imgX; $x++) { for ($y = 0; $y < $imgY; $y++) { - $colorat = $this->call('imageColorAt', - array($this->_im, $x, $y)); - - if (is_a($colorat, 'PEAR_Error')) { - return $colorat; - } - - $realPixel = $this->call('imageColorsForIndex', - array($this->_im, $colorat)); - - $colorat = $this->call('imageColorAt', - array($gdimg_mask_resized, $x, $y)); - - if (is_a($colorat, 'PEAR_Error')) { - return $colorat; - } - + $colorat = $this->call('imageColorAt', array($this->_im, $x, $y)); + $realPixel = $this->call('imageColorsForIndex', array($this->_im, $colorat)); + $colorat = $this->call('imageColorAt', array($gdimg_mask_resized, $x, $y)); $maskPixel = Horde_Image::grayscalePixel($this->call('imageColorsForIndex', array($gdimg_mask_resized, $colorat))); $maskAlpha = 127 - (floor($maskPixel['red'] / 2) * (1 - ($realPixel['alpha'] / 127))); $newcolor = $this->_allocateColorAlpha($gdimg_mask_blendtemp, @@ -855,8 +841,7 @@ class Horde_Image_Gd extends Horde_Image_Base $realPixel['green'], $realPixel['blue'], intval($maskAlpha)); - $this->call('imageSetPixel', - array($gdimg_mask_blendtemp, $x, $y, $newcolor)); + $this->call('imageSetPixel', array($gdimg_mask_blendtemp, $x, $y, $newcolor)); } } $this->call('imageAlphaBlending', array($this->_im, false)); -- 2.11.0