📜  PHP 调整大小 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.941000             🧑  作者: Mango

代码示例1
function adaptiveResizeImage($image_path, $width, $height, $bestFit)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->adaptiveResizeImage($width, $height, $bestFit);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}