ASP 图片水印

来源:互联网 发布:touchwin触摸屏要编程 编辑:程序博客网 时间:2024/05/14 00:02

'''''''''''''''''''''''''''''''''''''''''水印'''''''''''''''''''''''''''''''''''''''''''''''''''
Set Photo = Server.CreateObject("Persits.Jpeg")
    '确定要加入水印的图片路径
    PhotoPath = Server.MapPath(ulc.SavePath & ulc.Form("file"&i))
 
    Photo.Open PhotoPath
    '打开水印图片
    Set Logo = Server.CreateObject("Persits.Jpeg")
    LogoPath = Server.MapPath("mweb/temp.gif") '在这里修改水印图片所在的路径
    Logo.Open LogoPath    
    Transition_Color = 0
 iWidth=photo.OriginalWidth
 iHeight=photo.OriginalHeight

 iiWidth=Logo.OriginalWidth
 iiHeight=Logo.OriginalHeight

 iX=iWidth / 2
 iY=iHeight / 2
 
 iiX=iiWidth / 2
 iiY=iiHeight / 2
 
 iiiX=iX-iiX
 iiiY=iY-iiY

   Photo.DrawImage iiix,iiiy,Logo,0.1,,&H000000'//去背景色

   photo.Save Server.MapPath(ulc.SavePath & ulc.Form("file"&i))

Set Photo = Nothing
 '''''''''''''''''''''''''''''''''''''''''水印'''''''''''''''''''''''''''''''''''''''''''''''''''