dqjo4340 2015-07-09 23:21
浏览 35

无法覆盖最终方法Exception :: __ clone()imagick

<?php
    include_once 'imagick.php';

    $im = imagegrabscreen();
    imagepng($im, "myscreenshot.png");
    imagedestroy($im);

    $im = new Imagick('myscreenshot.png');
    $imageprops = $im->getImageGeometry();
    $width = $imageprops['width'];
    $height = $imageprops['height'];

    if($width > $height){
        $newHeight = 80;
        $newWidth = (80 / $height) * $width;
    }else{
        $newWidth = 80;
        $newHeight = (80 / $width) * $height;
    }

    $im->resizeImage($newWidth,$newHeight, imagick::FILTER_LANCZOS, 0.9, true);
    $im->cropImage (80,80,0,0);
    $im->writeImage( "test.jpg" );
    echo '<img src="test.jpg">';
?>

The image is being saved properly. However I am getting this error:

Fatal error: Cannot override final method Exception::__clone() in C:\xampp\htdocs\

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 树莓派安卓APK系统签名
    • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
    • ¥65 汇编语言除法溢出问题
    • ¥15 Visual Studio问题
    • ¥20 求一个html代码,有偿
    • ¥100 关于使用MATLAB中copularnd函数的问题
    • ¥20 在虚拟机的pycharm上
    • ¥15 jupyterthemes 设置完毕后没有效果
    • ¥15 matlab图像高斯低通滤波
    • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗