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');
            }
        }
    }