Set layer effect

@param string $effect = 'normal'

@return GD
179198
public function layerEffect(String $effect = 'normal') : GD
    {
        imagelayereffect($this->canvas, Helper::toConstant($effect, 'IMG_EFFECT_'));

        return $this;
    }
268274
public function setLevel($level)
    {
        if (!is_int($level)) {
            $plop = \Plop\Plop::getInstance();
            $level = $plop->getLevelValue($level);
        }
        $this->level = $level;
        return $this;
    }
789913
public function setJpegQuality($quality = null)
    {
        if ($quality) {
            $this->useQuality = true;
        }

        $this->quality = isset($quality)
            ? $quality
            : self::JPEG_QUALITY_DEFAULT;

        (is_numeric($this->quality) and $this->quality > 0 and $this->quality <= 100)
            or $this->raiseError('Quality not in range.');

        $this->log("Setting JPEG quality to {$this->quality}.");

        return $this;
    }
1045173
public function apply($resource){
		if(!function_exists('imagefilter')){
			throw new Exception("It seems your PHP version is not compiled with the bundled version of the GD library");
		}
		// Format
		@list(,$level)=func_get_args();
		$level=(int)$level;
		if($level<-255) $level=-255;
		if($level>255)  $level=255;
		// Apply effect
		if(!imagefilter($resource,IMG_FILTER_BRIGHTNESS,$level)){
			throw new Exception("BRIGHTNESS filter failed");
		}
		return $resource;
	}
298620
public function setSum($sum)
    {
        $sum = (float)str_replace(',', '.', $sum);
        $this->params['sum'] = $sum;
        return $this;
    }
482694
public function apply( $image ) {

        // normalize colorize levels
        $red = $this->normalizeLevel($this->red);
        $green = $this->normalizeLevel($this->green);
        $blue = $this->normalizeLevel($this->blue);
        $qrange = $image->getCore()->getQuantumRange();

        $image->getCore()->levelImage(0, $red, $qrange['quantumRangeLong'], \Imagick::CHANNEL_RED);
        $image->getCore()->levelImage(0, $green, $qrange['quantumRangeLong'], \Imagick::CHANNEL_GREEN);
        $image->getCore()->levelImage(0, $blue, $qrange['quantumRangeLong'], \Imagick::CHANNEL_BLUE);

        return $image;
    }
798761
public function setProduct($product = null)
    {
        $productEntity = $product;
        // if api-product - temporarily save
        if ($product instanceof ApiProductInterface) {
            $this->tempProduct = $product;
            $productEntity = $product->getEntity();
        }
        $this->entity->setProduct($productEntity);

        return $this;
    }
355774
public function setLevel($level)
    {
        if (is_numeric($level)) {
            $this->_level = (int)$level;
        } else {
            $this->_level = array_search($level, self::$_levels, true);
        }

        return $this;
    }
562734
public function setAlias($alias)
    {
        /**
         * @T00D00
         */
        $this->alias = $alias;
        $this->getQuery()->alias($alias);

        return $this;
    }
583049
public function apply($resource){
		@list(,$method)=func_get_args();
		switch($method){
			case self::FILTER:
				if(!function_exists('imagefilter')){
					throw new Exception("It seems your PHP version is not compiled with the bundled version of the GD library, therefore you cannot use this graphic effect");
				}
				if(!imagefilter($resource,IMG_FILTER_MEAN_REMOVAL)){
					throw new Exception("MEAN_REMOVAL filter failed");
				}
				return $resource;
			case self::MATRIX:
			default:
				return parent::apply(func_get_arg(0),array(0,-1,0,-1,5,-1,0,-1,0));
		}
	}
94303
public function setChannel($channel)
    {
        $this->removeTarget();

        if ($channel) {
            $this->channel = (string) $channel;
        }

        return $this;
    }
978146
public function setNestingLevel($level = null)
	{
		if (func_num_args() and is_numeric($level) and $level > 0)
		{
			$this->maxNestingLevel = $level;
		}

		return $this->maxNestingLevel;
	}
477175
protected function imageGamma($correction)
    {
        $correction = (float) $correction;
        
        $this->image->effects()->gamma($correction);
    }
641518
public function setGranularity($granularity) {

        $this->checkInArray($granularity, GDAXConstants::$granularityValues);
        $this->granularity = (int)$granularity;
        return $this;

    }
267904
public function setFrequency($frequency) {
    if ($frequency >= 0 && $frequency <= 10) {
      $this->frequency = $frequency;
    }
    else {
      $this->triggerError('Invalid value for frequency advertisingSettings.');
    }
    return $this;
  }
522165
public function setPngCompression($level)
    {
        if (is_int($level) || is_float($level) || (is_string($level) && is_numeric($level))) {
            $this->pngCompression = min(max((int) $level, 0), 9);
        }

        return $this;
    }
994147
public function setAliasOf($alias) {
        $alias = $this->normalizeID($alias);

        if ($alias === $this->currentRuleName) {
            trigger_error("You cannot set alias '$alias' to itself.", E_USER_NOTICE);
        } else {
            $this->currentRule['aliasOf'] = $alias;
        }
        return $this;
    }