操作实现函数:- Function AddWater(n)
- Set Photo = Server.CreateObject("Persits.Jpeg")
- PhotoPath = Server.MapPath(n)
- Photo.Open PhotoPath
- Photo.Interpolation=1
- Photo.Quality=100
- iWidth=Photo.OriginalWidth
- iHeight=Photo.OriginalHeight
- iiwidth=214 '水印图片的宽度
- iiheight=51 '水印图片的高度
- Photo.Canvas.DrawPNG iWidth-iiWidth-5, iHeight-iiHeight-5,Server.MapPath("Water.png") 'Water.png即为水印图片
- Photo.save Server.mappath(n) '输出图片
- Set Photo = Nothing
- End Function
复制代码
调用方法:
<% Call AddWater(图片名称)%> |
上一篇: asp图片加水印的功能代码下一篇: JavaScript实现带自动提示的文本框效果代码
|