Php windows server上的iMagick透视图扭曲

Php windows server上的iMagick透视图扭曲,php,windows,imagick,Php,Windows,Imagick,我正试图通过imagick php扩展扭曲透视图中的图像,为此我提供了以下代码: $controlPoints = array( 0,0, 0,0, 0,$height, 0,$height, $width,0, $width,$perspective_wrap, $width,$height, $width,$hps

我正试图通过imagick php扩展扭曲透视图中的图像,为此我提供了以下代码:

    $controlPoints = array(
                    0,0, 0,0, 
                    0,$height, 0,$height, 
                    $width,0, $width,$perspective_wrap, 
                    $width,$height, $width,$hps
                    );
$im1->setImageMatte(true);
//Distort the image -- In perspective with the matrix given above
$im1->distortImage(Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true);  


linux服务器上的图像透视图失真,但当我在windows主机上移动脚本时,似乎发生了以下错误:
致命错误:未捕获异常“ImagickException”,消息为“无法读取参数数组”

其中直线为$im1->畸变图像(Imagick::畸变透视,$controlPoints,true)


有没有办法让它在两个平台上都工作

在我的linux服务器上,我的Imagick版本如下:
ImageMagick版本:ImageMagick 6.7.6-8 2012-05-02 Q16

在windows服务器上:

ImageMagick版本ImageMagick 6.4.1 05/16/08 Q16


因此,在windows服务器上,$controlPoints数组必须将所有元素都作为INT值。在linux服务器和image magick版本上,如果某些值是字符串,则没有问题,因此问题的解决方案是将$controlPoints数组值转换为int值。

希望有人能像我一样克服这个问题