去评论
dz插件网

丧心病狂的水印

admin
2020/07/07 09:20:09
png格式
\source\class\class_image.php
注释掉:
  1. imageCopy($dst_photo, $watermark_logo, $x, $y, 0, 0, $logo_w, $logo_h);
其下添加:
  1. if(intval($this->imginfo['width']/$logo_w)>=3){$wblank=($logo_w+$this->imginfo['width']%$logo_w)/intval($this->imginfo['width']/$logo_w);$hblank=($logo_h+$this->imginfo['height']%$logo_h)/intval($this->imginfo['height']/$logo_h);for($x = $wblank;$x+$logo_w<=$this->imginfo['width'];$x=$x+$logo_w+$wblank){    for($y = $hblank;$y+$logo_h<=$this->imginfo['height'];$y=$y+$logo_h+$hblank){        imageCopy($dst_photo, $watermark_logo, $x, $y, 0, 0, $logo_w, $logo_h);    }}}else{    for($x = 5;$x+$logo_w<=$this->imginfo['width'];$x=$x+$logo_w+10){        for($y = 5;$y+$logo_h<=$this->imginfo['height'];$y=$y+$logo_h+10){            imageCopy($dst_photo, $watermark_logo, $x, $y, 0, 0, $logo_w, $logo_h);        }    }}
水印图片形状不好会很难看。