PHP致命错误:Class' Imagick'未找到

时间:2017-01-23 12:00:42

标签: php windows tiff imagick pecl

我正在尝试从TIFF二进制数据创建JPEG图像。我调用SOAP服务并获取TIFF二进制数组,如下所示:

$val = array(
                "arg0" => XXX,
                "arg1" => XXX,
        );

        $headerbody  = array(
                'Username'=>XXX,
                'Password'=>XXX,
        );
$wsdl =  'wsdl services url';   
    $client = new SoapClient($wsdl);
            $soap_var_header = new SoapVar($headerbody, SOAP_ENC_OBJECT);
            $header = new SoapHeader("http://webservices.averittexpress.com/authn",'authnHeader', $soap_var_header);
            $client->__setSoapHeaders($header);
            $value = $client->getDocument($val);

        try {           
        $im = new Imagick();
        $im->readImageBlob($value->return);
        $im->setFormat('JPEG');
        file_put_contents('Test.jpeg', $im->getImageBlob());
        } catch (Exception $e) {
            return $e->getMessage();
        }

问题是代码失败并出现错误:

  

致命错误:Class' Imagick'找不到

我在php.ini中启用了php_imagick.dll

; Imagick Extension
[Imagick]
extension = "php_imagick.dll"

php_imagick库显示为PHP扩展名。

提前致谢。

0 个答案:

没有答案