php 给图片加水印

<?php
    water(‘upload/images/202007250204199.jpg‘, ‘upload/images/202007250155160.jpg‘);
    
    function water($durl, $surl) {
        $dit = imagecreatefromjpeg($durl);
        $src = imagecreatefromjpeg($surl);
        
        list($dw, $dh) = getimagesize($durl);
        list($sw, $sh) = getimagesize($surl);
        
        $result = imagecopymerge($dit, $src, ($dw - $sw) / 2, $dh - $sh - 100, 0, 0, $sw, $sh, 100);
        
        header(‘Content-type:image/jpeg‘);
        imagejpeg($dit, NULL, 100);
        
        imagedestroy($dit);
        imagedestroy($src);
    }
?>

 

php 给图片加水印

上一篇:AjaxSubmit时asp.net button.click事件不能触发问题研究(普通提交能触发)


下一篇:JS中的数据类型,包含ES6,set和map等等