97久久国产亚洲精品超碰热,成人又色又爽的免费网站,色偷偷女人的天堂a,男女高潮喷水在线观看,国内精品一线二线三线区别在哪里
Discuz! 官方交流社區(qū)
標(biāo)題:
小黑條文字水印,不破壞原圖,后臺(tái)控制文字及背景顏色,更新帶日期版本
[打印本頁(yè)]
作者:
haoma1
時(shí)間:
2023-3-17 04:46
標(biāo)題:
小黑條文字水印,不破壞原圖,后臺(tái)控制文字及背景顏色,更新帶日期版本
后臺(tái)設(shè)置文本水印文字時(shí),雖然可以任意輸入,但不要輸英文或數(shù)字字符,輸一個(gè)中文,就可以了。
后臺(tái)設(shè)置:
啟用水印功能。
水印位置任選。
添加水印條件自定。
水印圖片類型選擇文字水印。
融合度質(zhì)量100(其實(shí)多少都沒(méi)影響)。
文本水印文字,請(qǐng)輸入任意內(nèi)容(一定要輸,不然出錯(cuò))
選擇自己上傳的字體。
文字大小8-10自己看著辦。
文本水印顯示角度:0
水印字體顏色【自己測(cè)試效果】
水印陰影顏色【自己測(cè)試效果】
其它無(wú)視了,提交測(cè)試吧。
修改方法:
打開\source\class目錄下class_image.php文件
查找
} elseif($this->param['watermarktype'][$type] == 'text') {
if(($this->param['watermarktext']['shadowx'][$type] || $this->param['watermarktext']['shadowy'][$type]) && $this->param['watermarktext']['shadowcolor'][$type]) {
$shadowcolorrgb = explode(',', $this->param['watermarktext']['shadowcolor'][$type]);
$shadowcolor = imagecolorallocate($dst_photo, $shadowcolorrgb[0], $shadowcolorrgb[1], $shadowcolorrgb[2]);
imagettftext($dst_photo, $this->param['watermarktext']['size'][$type], $this->param['watermarktext']['angle'][$type], $x + $ax + $this->param['watermarktext']['shadowx'][$type], $y + $ay + $this->param['watermarktext']['shadowy'][$type], $shadowcolor, $this->param['watermarktext']['fontpath'][$type], $watermarktextcvt);
}
$colorrgb = explode(',', $this->param['watermarktext']['color'][$type]);
$color = imagecolorallocate($dst_photo, $colorrgb[0], $colorrgb[1], $colorrgb[2]);
imagettftext($dst_photo, $this->param['watermarktext']['size'][$type], $this->param['watermarktext']['angle'][$type], $x + $ax, $y + $ay, $color, $this->param['watermarktext']['fontpath'][$type], $watermarktextcvt);
} else {
復(fù)制代碼
替換為:
} elseif($this->param['watermarktype'][$type] == 'text' && $this->imginfo['width'] >= 250) {
$objTmpImg = @imagecreatetruecolor($this->imginfo['width'], $this->imginfo['height']+16);
@imagecopy($objTmpImg, $dst_photo, 0, 0, 0, 0, $this->imginfo['width'], $this->imginfo['height']);
$dst_photo = $objTmpImg;
$bg_x1 = 0;
$bg_y1 = $this->imginfo['height'];
$bg_x2 = $this->imginfo['width'];
$bg_y2 = $this->imginfo['height']+16;
$shadowcolorrgb = explode(',', $this->param['watermarktext']['shadowcolor'][$type]);
$shadowcolor = imagecolorallocate($dst_photo, $shadowcolorrgb[0], $shadowcolorrgb[1], $shadowcolorrgb[2]);
imagefilledrectangle($dst_photo, $bg_x1, $bg_y1, $bg_x2, $bg_y2, $shadowcolor);
$colorrgb = explode(',', $this->param['watermarktext']['color'][$type]);
$n = $_G['member']['username'];
$w = $_G['setting']['bbname'];
$u = $_G['setting']['siteurl'];
preg_match("/^(http:\/\/)?([^\/]+)/i",$u, $ur);
$url = $ur[2];
preg_match("/[^\.\/]+\.[^\.\/]+$/", $url, $ur);
$wtext = "該圖片由網(wǎng)友上傳,版權(quán)歸原創(chuàng)者所有 ".date('Y-m-d h:i')."";
$watermarktextcvt = $wtext;
$color = imagecolorallocate($dst_photo, $colorrgb[0], $colorrgb[1], $colorrgb[2]);
imagettftext($dst_photo, $this->param['watermarktext']['size'][$type], $this->param['watermarktext']['angle'][$type], $ax + 3, $this->imginfo['height'] + $ay + 1, $color, $this->param['watermarktext']['fontpath'][$type], $watermarktextcvt);
} else {
復(fù)制代碼
歡迎光臨 Discuz! 官方交流社區(qū) (http://r615.cn/)
Powered by Discuz! X5.0