@see \Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface::load()

@param ImageInterface $image
@param array          $options

@return ImageInterface|static
772537
public function load(ImageInterface $image, array $options = [])
    {
        $x = isset($options['start'][0]) ? $options['start'][0] : null;
        $y = isset($options['start'][1]) ? $options['start'][1] : null;

        $destImage = $this->imagine->open($this->rootPath.'/'.$options['image']);

        return $image->paste($destImage, new Point($x, $y));
    }
665686
public function loadImage(EventInterface $event) {
        $request = $event->getRequest();
        $response = $event->getResponse();

        $event->getDatabase()->load(
            $request->getUser(),
            $request->getImageIdentifier(),
            $response->getModel()
        );
    }
351755
private function storeImage(Image $image)
    {
        $file = $this->getFile($image);

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

        $path = $this->imageManagerInterface->store($file);

        return $image->setPath($path);
    }
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;
    }
814279
public function load(ImageInterface $image, array $options = [])
    {
        $options += [
            'size' => null,
            'position' => 'center',
        ];

        if ('%' === mb_substr($options['size'], -1)) {
            $options['size'] = mb_substr($options['size'], 0, -1) / 100;
        }

        $watermark = $this->imagine->open($this->rootPath.'/'.$options['image']);

        $size = $image->getSize();
        $watermarkSize = $watermark->getSize();

        // If 'null': Downscale if needed
        if (!$options['size'] && ($size->getWidth() < $watermarkSize->getWidth() || $size->getHeight() < $watermarkSize->getHeight())) {
            $options['size'] = 1.0;
        }

        if ($options['size']) {
            $factor = $options['size'] * min($size->getWidth() / $watermarkSize->getWidth(), $size->getHeight() / $watermarkSize->getHeight());

            $watermark->resize(new Box($watermarkSize->getWidth() * $factor, $watermarkSize->getHeight() * $factor));
            $watermarkSize = $watermark->getSize();
        }

        switch ($options['position']) {
            case 'topleft':
                $x = 0;
                $y = 0;
                break;
            case 'top':
                $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2;
                $y = 0;
                break;
            case 'topright':
                $x = $size->getWidth() - $watermarkSize->getWidth();
                $y = 0;
                break;
            case 'left':
                $x = 0;
                $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2;
                break;
            case 'center':
                $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2;
                $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2;
                break;
            case 'right':
                $x = $size->getWidth() - $watermarkSize->getWidth();
                $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2;
                break;
            case 'bottomleft':
                $x = 0;
                $y = $size->getHeight() - $watermarkSize->getHeight();
                break;
            case 'bottom':
                $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2;
                $y = $size->getHeight() - $watermarkSize->getHeight();
                break;
            case 'bottomright':
                $x = $size->getWidth() - $watermarkSize->getWidth();
                $y = $size->getHeight() - $watermarkSize->getHeight();
                break;
            default:
                throw new \InvalidArgumentException("Unexpected position '{$options['position']}'");
                break;
        }

        return $image->paste($watermark, new Point($x, $y));
    }
1112679
public function animalDetect($image, $options=array()){

        $data = array();
        
        $data['image'] = base64_encode($image);

        $data = array_merge($data, $options);

        return $this->request($this->animalDetectUrl, $data);
    }
789461
public function logoDeleteByImage($image, $options=array()){

        $data = array();
        
        $data['image'] = base64_encode($image);

        $data = array_merge($data, $options);

        return $this->request($this->logoDeleteUrl, $data);
    }
716483
public function form($image, $options=array()){

        $data = array();
        
        $data['image'] = base64_encode($image);

        $data = array_merge($data, $options);

        return $this->request($this->formUrl, $data);
    }
1235083
function load(ImageInterface $image, array $options = [])
    {
        if (!array_key_exists('file', $options)) {
            throw new InvalidArgumentException('Expected mask file path, none given');
        }

        if (!file_exists($options['file'])) {
            throw new InvalidArgumentException("Mask file doesn't exists");
        }

        $mask = new ApplyShape($this->imagine->open($options['file']));

        return $mask->apply($image);
    }
617245
public function load($file, array $options = []): Config
    {
        expect_type($file, 'string');

        $options += $this->options;
        $path = $this->absolutePath($file, $options['base_path'] ?? getcwd());

        if (!$this->assertFile($path, $options)) {
            return new Config();
        }

        $data = $this->loadFile($path, $options);
        $this->assertData($data, $file);

        return new Config($data);
    }
668166
public function removeImage(\Elcodi\Component\Media\Entity\Interfaces\ImageInterface $image)
    {
        $this->images->removeElement($image);

        return $this;
    }
903227
protected function loadFile(string $file, array $options): ?Config
    {
        if (is_dir($file)) {
            return (bool)($options['recursive'] ?? false) ? $this->load($file, $options) : null;
        }

        return $this->getFileLoader()->load($file, $options);
    }
984603
public function tableRecognitionAsync($image, $options=array()){

        $data = array();
        
        $data['image'] = base64_encode($image);

        $data = array_merge($data, $options);

        return $this->request($this->tableRecognizeUrl, $data);
    }
904150
public function add($other, array $options = []): Image
    {
        if (self::isImageish($other)) {
            return self::call('add', $this, [$other], $options);
        } else {
            return $this->linear(1, $other, $options);
        }
    }
69263
public function setImage(\Core\Entity\Image $image = null) {
        $this->image = $image;

        return $this;
    }
613381
public function loadPicture($image, $worker = NULL)
    {
        if($this->pictureLoader)
        {
            return $this->pictureLoader->loadPicture($image, $this, $worker);
        }

        return new Picture($image, $this, $worker, $this->fallbackImage);
    }
324797
public function advancedGeneral($image, $options=array()){

        $data = array();
        
        $data['image'] = base64_encode($image);

        $data = array_merge($data, $options);

        return $this->request($this->advancedGeneralUrl, $data);
    }