国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
遠(yuǎn)程圖片自動(dòng)保存到本地服務(wù)器加上水印

<%
‘函數(shù)功能:遠(yuǎn)程圖片自動(dòng)保存到本地服務(wù)器,并利用aspjpeg為圖片加上水印
‘(注意:請(qǐng)先在目錄下創(chuàng)建images目錄,用來保存臨時(shí)圖片)

Server.ScriptTimeOut=99999

const savepath="images" ‘圖片保存路徑
url=request("url")

function myreplace(str)
newstr=str
set objregEx = new RegExp
objregEx.IgnoreCase = true
objregEx.Global = true
objregEx.Pattern = "http://(.+?)\.(jpg|gif|png|bmp)" ‘定義文件后綴
set matches = objregEx.execute(str)
for each match in matches
  newstr=replace(newstr,match.value,saveimg(match.value))
next
myreplace=newstr
end function

function saveimg(url)
temp=split(url,".")
‘以下是用時(shí)間與隨機(jī)數(shù)重命名文件名
randomize
ranNum=int(90000*rnd)+10000
filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&temp(ubound(temp))
‘文件名重命名結(jié)束
set xmlhttp=server.createobject("Microsoft.XMLHTTP")
xmlhttp.open "get",url,false
xmlhttp.send
img=xmlhttp.ResponseBody
set xmlhttp=nothing
set objAdostream=server.createobject("ADODB.Stream")
objAdostream.Open()
objAdostream.type=1
objAdostream.Write(img)
objAdostream.SaveToFile(server.mappath(savepath&filename))
objAdostream.SetEOS
set objAdostream=nothing
‘水印部分
saveimg=savepath&filename ‘獲取保存路徑
Dim Jpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath(saveimg) ‘打開保存圖片的路徑

‘ 添加文字水印
Jpeg.Canvas.Font.Color = &HFF0000‘ 紅色
Jpeg.Canvas.Font.Family = "宋體"
Jpeg.Canvas.Font.Bold = True
Jpeg.Canvas.Print Jpeg.OriginalWidth-200,Jpeg.OriginalHeight-50, "siyizhu.com" ‘水印離左邊的距離,離頂端的距離,這個(gè)是放在右下腳了
‘保存文件
Jpeg.Save Server.MapPath(saveimg) ‘保存添加水印后的圖片

‘ 注銷對(duì)象
Set Jpeg = Nothing
end function
%>

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
php圖片水印代碼一例
微博中的圖片存儲(chǔ)的數(shù)據(jù)庫(kù)設(shè)計(jì)(原創(chuàng))
上傳圖片檢測(cè)其是否為真實(shí)的圖片 防范病毒上傳至服務(wù)器
網(wǎng)頁(yè)內(nèi)容分析工具
php 遠(yuǎn)程圖片地址 轉(zhuǎn) base64
【免摳圖片】
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服