private function getWatermark(ImagineInterface $imagine): ?ImageInterface
    {
        $resource = null;
        if ($this->getMarkFilepath() !== null) {
            $resource = fopen($this->getMarkFilepath(), 'rb');
        } elseif (\is_string($this->markContent)) {
            $resource = 'a'; // TODO: create resource.
        } elseif (\is_resource($this->markContent)) {
            $resource = $this->markContent;
        }

        if ($resource === null) {
            return null;
        }

        return $imagine->read($resource);
    }
private function getWatermark(ImagineInterface $imagine): ?ImageInterface
    {
        $resource = null;
        if ($this->getMarkFilepath() !== null) {
            $resource = fopen($this->getMarkFilepath(), 'rb');
        } elseif (\is_string($this->markContent)) {
            $resource = 'a'; // TODO: create resource.
        } elseif (\is_resource($this->markContent)) {
            $resource = $this->markContent;
        }

        if ($resource === null) {
            return null;
        }

        return $imagine->read($resource);
    }
private function getWatermark ( ImagineInterface $ imagine ) : ? ImageInterface { $ resource = null ; if ( $ this -> getMarkFilepath ( ) !== null ) { $ resource = fopen ( $ this -> getMarkFilepath ( ) , 'rb' ) ; } elseif ( \ is_string ( $ this -> markContent ) ) { $ resource = 'a' ; // TODO: create resource. } elseif ( \ is_resource ( $ this -> markContent ) ) { $ resource = $ this -> markContent ; } if ( $ resource === null ) { return null ; } return $ imagine -> read ( $ resource ) ; }
Get watermark image
@param ImagineInterface $imagine
@return ImageInterface|null
@throws \Imagine\Exception\RuntimeException
@throws \UnexpectedValueException
@throws \ErrorException
Get watermark image