开发者

new imagick does not work

I have set up the environment and configuration for the imagick in local server Xampp. it works well when I user exec like:

exec("convert source.jpg des.p开发者_如何学JAVAng");

then I want to do it in OOP way, so I attempt this with:

$image=new Imagick("filepath");
$image->setImageFormat('png');
echo $image;

but this ends up with a page saying "the web page is not available", then I try to remove the filepath and just try to create an empty object like:

$image=new Imagick();

and this does not appear any errors. does any body know what may be the reason? one of posts in here mentioned to look at the log, but I don't know where the log is, can somebody be kind to help me? thanks a lot.


Are you passing "filepath" as a string (i.e. an image called "filepath")? Try to turn on all PHP warnings

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜