当前位置: 首页 > 图文教程 > 网络编程 > ASP > aspjpeg组件通用加水印函数代码

ASP
利用ASP输出excel文件一例
asp中使用js的encodeURIComponent
ASP动态网站制作中使用MYSQL的分析
如何编写通用的ASP防SQL注入攻击程序
ASP脚本变量、函数、过程和条件语句
ASP内建对象Application和Session
ASP基础教程:常用的 ASP ActiveX 组件
ASP程序漏洞解析及黑客入侵防范方法
ASP访问带多个参数的存储过程
用ASP和SQL语句动态的创建Access表
ASP初学者学习ASP指令
ASP开发中有用的函数(function)集合(1)
ASP开发中有用的函数(function)集合(2)
ASP开发中有用的函数(function)集合(3)
ASP网站程序自动升级实现的方法
ASP开发中的(VBScript)类基础学习
ASP代码:防止重复多次提交表单的方法
在ASP中使用类,实现模块化
ASP基础教程之学习ASP中子程序的应用
ASP技巧:ASP中三个常用语句的使用技巧

ASP 中的 aspjpeg组件通用加水印函数代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 130 ::
收藏到网摘: n/a

asp下需要给图片加水印一般就需要一些组件,aspjpeg是asp最常用的组件之一,下面的方法。 aspjpeg组件实现加水印函数的调用方法:
<%printwater "/upload/tech/20091012/20091012012701_559cb990c9dffd8675f6bc2186971dc2.gif","/upload/tech/20091012/20091012012702_0e01938fc48a2cfb5f2217fbfb00722d.jpg") %>
复制代码 代码如下:

function printwater(waterpath,upfilepath)
Dim Logobox,LogoPath,ogvbox
LogoPath = Server.MapPath(waterpath)
Set Logobox = Server.CreateObject("/upload/tech/20091012/20091012012702_a9a1d5317a33ae8cef33961c34144f84.jpeg")
Logobox.Open LogoPath
Logobox.Width = 108
Logobox.Height = 65
Set ogvbox = Server.CreateObject("/upload/tech/20091012/20091012012702_a9a1d5317a33ae8cef33961c34144f84.jpeg")
ogvbox.Open Trim(Server.MapPath(upfilepath))
ogvbox.Canvas.Pen.Color = &H000000 '//增加水印后图片的边框色彩。
ogvbox.Canvas.Pen.Width = 1 '//增加水印后图片的边框宽度。
ogvbox.Canvas.Brush.Solid = False '//边框内是否填充颜色,你可以试试看值为True时的效果^o^
ogvbox.DrawImage ogvbox.width-108, ogvbox.height-65, Logobox, 0.6
ogvbox.Canvas.Bar 0, 0, ogvbox.Width, ogvbox.Height
ogvbox.Save Server.MapPath(upfilepath)
Set Logobox=Nothing
Set ogvbox=Nothing
end function