Home > Article > Backend Development > php imagick mask method
The content of this article is about the php imagick masking method, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
php imagick蒙版做法
$image = new \Imagick(); $image->readImage(__DIR__ . '/mengban.png'); $watermark = new \Imagick(); $watermark->readImage(__DIR__ . '/testmengban.jpg'); /*$watermark->scaleImage(750, 1206, true); *///放到等比例按照宽度缩小图片 按照 $image->compositeImage($watermark, \imagick::COMPOSITE_ATOP, 0, 0); $image->writeImage(__DIR__ . '/mengbanresult.png');
View original text :http://newmiracle.cn/?p=2562
Related recommendations:
win10_php_imagick extension installation
How to use php_imagick to achieve retro effect_php example
The above is the detailed content of php imagick mask method. For more information, please follow other related articles on the PHP Chinese website!