php-如何解决imagemagick中的错误Imagick :: textureImage?

时间:2013-12-31 07:38:53

标签: php imagemagick xampp

当我尝试运行时,我有这段代码显示错误...

我的代码

<?php
$image = new Imagick();
$image->newImage(500, 500, new ImagickPixel('red'));
$image->setImageFormat("png");
$type=$image->getFormat();
header("Content-type: $type");

$texture = new Imagick();
$texture->readImage('texture.png');
$image = $image->textureImage($texture);

echo $image;
    ?>

错误

Fatal error: Uncaught exception 'ImagickException' with message 'RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/673' in C:\xampp\htdocs\t1\e3.php:5 Stack trace: #0 C:\xampp\htdocs\t1\e3.php(5): Imagick->setimageformat('png') #1 {main} thrown in C:\xampp\htdocs\t1\e3.php on line 5

如何解决它。

0 个答案:

没有答案