/** * Create a new image handler. * Creates an image handler. This should never be done directly, * but only through the manager for configuration reasons. One can * get a direct reference through manager afterwards. * * This handler has an option 'binary' available, which allows you to * explicitly set the path to your ImageMagicks "convert" binary (this * may be necessary on Windows, since there may be an obscure "convert.exe" * in the $PATH variable available, which has nothing to do with * ImageMagick). * * @throws ezcImageHandlerNotAvailableException * If the ImageMagick binary is not found. * * @param ezcImageHandlerSettings $settings Settings for the handler. */ public function __construct(ezcImageHandlerSettings $settings) { // Check for ImageMagick $this->checkImageMagick($settings); $this->determineTypes(); parent::__construct($settings); }
/** * Create a new image handler. * Creates an image handler. This should never be done directly, * but only through the manager for configuration reasons. One can * get a direct reference through manager afterwards. * * @param ezcImageHandlerSettings $settings * Settings for the handler. * * @throws ezcImageHandlerNotAvailableException * If the precondition for the handler is not fulfilled. */ public function __construct(ezcImageHandlerSettings $settings) { if (!ezcBaseFeatures::hasExtensionSupport('gd')) { throw new ezcImageHandlerNotAvailableException("ezcImageGdHandler", "PHP extension 'GD' not available."); } $this->determineTypes(); parent::__construct($settings); }