当前位置: 首页>>代码示例>>PHP>>正文


PHP ezcBaseFeatures::getImageConvertExecutable方法代码示例

本文整理汇总了PHP中ezcBaseFeatures::getImageConvertExecutable方法的典型用法代码示例。如果您正苦于以下问题:PHP ezcBaseFeatures::getImageConvertExecutable方法的具体用法?PHP ezcBaseFeatures::getImageConvertExecutable怎么用?PHP ezcBaseFeatures::getImageConvertExecutable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ezcBaseFeatures的用法示例。


在下文中一共展示了ezcBaseFeatures::getImageConvertExecutable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testInitFromSetBinary

 public function testInitFromSetBinary()
 {
     $settings = ezcImageImagemagickHandler::defaultSettings();
     $settings->options['binary'] = ezcBaseFeatures::getImageConvertExecutable();
     $handler = new ezcImageImagemagickHandler($settings);
     $filePath = $this->testFiles["jpeg"];
     $ref = $handler->load($filePath);
     $handler->close($ref);
 }
开发者ID:bmdevel,项目名称:ezc,代码行数:9,代码来源:handlershell_test.php

示例2: testGetImageConvertExecutable

 public function testGetImageConvertExecutable()
 {
     $this->assertEquals('/usr/bin/convert', ezcBaseFeatures::getImageConvertExecutable());
 }
开发者ID:andikoller,项目名称:FHC-3.0-FHBGLD,代码行数:4,代码来源:features_test.php

示例3: testGetImageConvertExecutable

 public function testGetImageConvertExecutable()
 {
     $this->assertNotNull(ezcBaseFeatures::getImageConvertExecutable());
 }
开发者ID:naderman,项目名称:pflow,代码行数:4,代码来源:features_windows_test.php

示例4: checkImageMagick

 /**
  * Checks for ImageMagick on the system.
  *
  * @param ezcImageHandlerSettings $settings The settings object of the current handler instance.
  * @return void
  *
  * @throws ezcImageHandlerNotAvailableException
  *         If the ImageMagick binary is not found.
  */
 private function checkImageMagick(ezcImageHandlerSettings $settings)
 {
     if (!isset($settings->options['binary'])) {
         $this->binary = ezcBaseFeatures::getImageConvertExecutable();
     } else {
         if (file_exists($settings->options['binary'])) {
             $this->binary = $this->settings['binary'];
         }
     }
     if ($this->binary === null) {
         throw new ezcImageHandlerNotAvailableException('ezcImageImagemagickHandler', 'ImageMagick not installed or not available in PATH variable.');
     }
     // Prepare to run ImageMagick command
     $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w'));
     // Open ImageMagick process
     $imageProcess = proc_open($this->binary, $descriptors, $pipes);
     // Close STDIN pipe
     fclose($pipes[0]);
     $outputString = '';
     // Read STDOUT
     do {
         $outputString .= rtrim(fgets($pipes[1], 1024), "\n");
     } while (!feof($pipes[1]));
     $errorString = '';
     // Read STDERR
     do {
         $errorString .= rtrim(fgets($pipes[2], 1024), "\n");
     } while (!feof($pipes[2]));
     // Wait for process to terminate and store return value
     $return = proc_close($imageProcess);
     // Process potential errors
     if (strlen($errorString) > 0 || strpos($outputString, 'ImageMagick') === false) {
         throw new ezcImageHandlerNotAvailableException('ezcImageImagemagickHandler', 'ImageMagick not installed or not available in PATH variable.');
     }
 }
开发者ID:jacomyma,项目名称:GEXF-Atlas,代码行数:44,代码来源:imagemagick_base.php


注:本文中的ezcBaseFeatures::getImageConvertExecutable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。