protected function sourceProperties()
    {
        $properties = Helper::imageProperties($this->source['file'], $this->source['path']);

        if ($properties['width'] !== null) {
            $this->source['width'] = $properties['width'];
            $this->source['height'] = $properties['height'];
            $this->source['aspect_ratio'] = $properties['aspect_ratio'];
        } else {
            throw new \Exception(Helper::ERROR_CALL_GETIMAGESIZE);
        }

        if ($this->canvas['width'] > $this->source['width'] || $this->canvas['height'] > $this->source['height']) {
            throw new \Exception(Helper::ERROR_UPSCALE);
        }
    }