function grayscale($mixedImage, $sDstImage = '') { if (is_array($mixedImage)) { $aRet = array(); foreach ($mixedImage as $s) { $aRet[] = $this->_grayscale($s, $s); } return $aRet; } else { return $this->_grayscale($mixedImage, $sDstImage); } }