protected function loadImageResource()
    {
        if(empty($this->resource))
        {
            if((is_null($this->worker) || $this->worker === $this::WORKER_IMAGICK) && $this->imagickAvailable())
            {
                $this->resource = $this->createImagick($this->image);
            }
            elseif((is_null($this->worker) || $this->worker === $this::WORKER_GD) && $this->gdAvailable())
            {
                $this->resource = $this->getGdResource($this->image);
            }
            else
            {
                throw new Exception('Required extensions missing, extension GD or Imagick is required');
            }
        }
    }
protected function loadImageResource()
    {
        if(empty($this->resource))
        {
            if((is_null($this->worker) || $this->worker === $this::WORKER_IMAGICK) && $this->imagickAvailable())
            {
                $this->resource = $this->createImagick($this->image);
            }
            elseif((is_null($this->worker) || $this->worker === $this::WORKER_GD) && $this->gdAvailable())
            {
                $this->resource = $this->getGdResource($this->image);
            }
            else
            {
                throw new Exception('Required extensions missing, extension GD or Imagick is required');
            }
        }
    }
protected function loadImageResource ( ) { if ( empty ( $ this -> resource ) ) { if ( ( is_null ( $ this -> worker ) || $ this -> worker === $ this :: WORKER_IMAGICK ) && $ this -> imagickAvailable ( ) ) { $ this -> resource = $ this -> createImagick ( $ this -> image ) ; } elseif ( ( is_null ( $ this -> worker ) || $ this -> worker === $ this :: WORKER_GD ) && $ this -> gdAvailable ( ) ) { $ this -> resource = $ this -> getGdResource ( $ this -> image ) ; } else { throw new Exception ( 'Required extensions missing, extension GD or Imagick is required' ) ; } } }
Loads an image as a resource for applying effects and transformations
@throws Exception
Loads an image as a resource for applying effects and transformations