ndfweb.cn

ASPJPEG添加半透明文字水印


2010-10-10 20:27:17 (6464)


function add_char_mark(imgpath,savepath,character)
if not mid(imgpath,2,1)=":" then
phypath=server.MapPath(imgpath)
else
phypath=imgpath
end if
if not mid(savepath,2,1)=":" then
physavepath=server.MapPath(savepath)
else
physavepath=savepath
end if
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open phypath
aa=Jpeg.Binary
Jpeg.Canvas.Font.Color = &Hfffffff
Jpeg.Canvas.Font.Family = Arial
Jpeg.Canvas.Font.Bold = True
Jpeg.Canvas.Font.Size = 35
Jpeg.Canvas.Font.ShadowColor = &H000000
Jpeg.Canvas.Font.ShadowYOffset = 1
Jpeg.Canvas.Font.ShadowXOffset = 1
Jpeg.Canvas.Brush.Solid = True
Jpeg.Canvas.Font.Quality = 4
Jpeg.Canvas.PrintText Jpeg.OriginalWidth/2-100,Jpeg.OriginalHeight/2+20,character

bb=Jpeg.Binary
Set MyJpeg = Server.CreateObject("Persits.Jpeg")
MyJpeg.OpenBinary aa
Set Logo = Server.CreateObject("Persits.Jpeg")
Logo.OpenBinary bb
MyJpeg.DrawImage 0,0, Logo, 0.2
MyJpeg.Save physavepath
MyJpeg.close
set MyJpeg=nothing
Jpeg.close
set Jpeg=nothing
end function 了解更多请访问:http://www.ndfweb.cn/news-537.html
  NDF俱乐部
  国际域名注册
  建站咨询
合作伙伴:万网 | 新网 | 新网互联 NDF网站建设淘宝店 | 实用工具 | 外貿網站建設 | 联系我们
鲁公网安备 37110202000336号 鲁ICP备2021027697号-1 Sitemap - RSSRSS订阅