@param ImageInterface|\Imagine\Gmagick\Image $image

@return ImageInterface
557337
public function apply(ImageInterface $image)
    {
        /** @var \Gmagick $gmagick */
        $gmagick = $image->getGmagick();
        $gmagick->reduceNoiseImage((float)$this->getOption('radius', 0));

        return $image;
    }
741290
public function imageInspect($image)
    {
        return $this->browser->get(
            $this->uri->expand(
                '/images/{image}/json',
                array(
                    'image' => $image
                )
            )
        )->then(array($this->parser, 'expectJson'));
    }
159208
public function run(Image $image)
    {
        $blur = $this->getBlur();

        if ($blur !== null) {
            $image->blur($blur);
        }

        return $image;
    }
1055604
public function performImageResize(File $image)
    {
        if ($image instanceof Image) {
            
            return $this->tools()->resize(
                $image,
                $this->owner->ImageResizeWidth,
                $this->owner->ImageResizeHeight,
                $this->owner->ImageResizeMethod
            );
            
        }
        
        return $image;
    }
1172576
public function run(Image $image)
    {
        if (is_null($this->bg)) {
            return $image;
        }

        $color = (new Color($this->bg))->formatted();

        if ($color) {
            $new = $image->getDriver()->newImage($image->width(), $image->height(), $color);
            $new->mime = $image->mime;
            $image = $new->insert($image, 'top-left', 0, 0);
        }

        return $image;
    }
192822
public function run(Image $image)
    {
        if ($watermark = $this->getImage($image)) {
            $markw = $this->getDimension($image, 'markw');
            $markh = $this->getDimension($image, 'markh');
            $markx = $this->getDimension($image, 'markx');
            $marky = $this->getDimension($image, 'marky');
            $markpad = $this->getDimension($image, 'markpad');
            $markfit = $this->getFit();
            $markpos = $this->getPosition();
            $markalpha = $this->getAlpha();

            if ($markpad) {
                $markx = $marky = $markpad;
            }

            $size = new Size();
            $size->setParams([
                'w' => $markw,
                'h' => $markh,
                'fit' => $markfit,
            ]);
            $watermark = $size->run($watermark);

            if ($markalpha < 100) {
                $watermark->opacity($markalpha);
            }

            $image->insert($watermark, $markpos, intval($markx), intval($marky));
        }

        return $image;
    }
556542
public function addImage(Image $image)
    {
        $images = array_map('strval', $this->images->toArray());
        if (!in_array($image->getSource(), $images)) {
            $this->images->add($image);
            $image->setItem($this);
        }

        return $this;
    }
491472
public function open($image) {
		if (!file_exists($image)) {
			throw new \RuntimeException(sprintf('File `%s` does not exist!', $image));
		}
		$this->_image = $this->imagine()->open($image);
		return $this;
	}
1287455
public function setDefaultImage($image)
    {
        if ($image !== false) {
            $this->cachedParams = null;

            $image = in_array(strtolower($image), $this->supportedImages)
                ? strtolower($image)
                : $this->checkImageUrl($image);
        }

        $this->defaultImage = $image;

        return $this;
    }
1193513
public function dispatchImageOnUploadEvent(ImageInterface $image)
    {
        $imageUploadedEvent = new ImageUploadedEvent($image);

        $this->eventDispatcher->dispatch(
            ElcodiMediaEvents::IMAGE_ONUPLOAD,
            $imageUploadedEvent
        );

        return $this;
    }
1267896
public function run(Image $image)
    {
        if ($flip = $this->getFlip()) {
            if ($flip === 'both') {
                return $image->flip('h')->flip('v');
            }

            return $image->flip($flip);
        }

        return $image;
    }
1250402
private function getFile(Image $image)
    {
        $file = $image->getFile();

        if ($file instanceof \SplFileInfo) {
            return $file;
        }

        $url = $image->getUrl();

        if (null !== $url) {
            return new File($this->downloadFile($url));
        }

        return null;
    }
284169
public function run(Image $image)
    {
        $contrast = $this->getContrast();

        if ($contrast !== null) {
            $image->contrast($contrast);
        }

        return $image;
    }
732884
public function make(Image $image, string $version): Image
    {
        $config = $this->getVersionConfig($version);
        $manipulator = $this->extractManipulatorNameFromConfig($config);

        $binary = $this->manipulate($image->getBinary(), $manipulator, $config);

        return $image->modify($binary, $version);
    }
596863
public function run(Image $image)
    {
        if ($border = $this->getBorder($image)) {
            list($width, $color, $method) = $border;

            if ($method === 'overlay') {
                return $this->runOverlay($image, $width, $color);
            }

            if ($method === 'shrink') {
                return $this->runShrink($image, $width, $color);
            }

            if ($method === 'expand') {
                return $this->runExpand($image, $width, $color);
            }
        }

        return $image;
    }
206549
public function flatten(&$image){
        if($image->isAnimated()){
            $imagick = $image->getCore()->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
            $image = new Image(
                $imagick,
                $image->getImageFile(),
                $image->getWidth(),
                $image->getHeight(),
                $image->getType(),
                '', // blocks
                false // animated
            );
        }
        return $this;
    }
227668
public static function image($image, $options = [])
	{
		$static = new static;

		$static->image = $image;
		$static->options = $options;
		$static->intervention = new ImageManager(['driver' => 'gd']);

		$static->normalizeNames();

		return $static;
	}