public function setEnableImageMagick($enable)
    {
        if (!is_bool($enable)) {
            throw new \InvalidArgumentException(
                "enableImageMagick can only assume boolean values. Specified value: $enable.");
        }

        // Verify that the Imagick extension is installed
        if ($enable && !extension_loaded('imagick')) {
            throw new \Exception(
                'Failed to enable ImageMagick. '.
                'The Imagick PHP extension was not found on this system.');
        }
        
        $this->enableImageMagick = $enable;
    }