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

ASP
ASP下经常用的字符串等函数参考资料
asp下连接数据库 ASP链接数据库字符串大全总结
asp内置对象 ObjectContext 事务管理 详解
asp 内置对象 Application 详解
ASP中 SQL语句 使用方法
ASP 中 Split 函数的实例分析
ASP 中 DateDiff 函数详解 主要实现两日期加减操作
asp 存贮过程 (SQL版asp调用存储过程)
利用ASP实现在线生成电话图片效果脚本附演示
使用ASP记录在线用户的数量的代码
关于ASP生成伪参数技巧 简洁实用的伪(僞)参数
asp 关键词字符串分割如何实现方法
用ASP编写的加密和解密类
ASP之处理用Javascript动态添加的表单元素数据的代码
asp下最常用的19个基本技巧
一些Asp技巧和实用解决方法
asp实现一个统计当前在线用户的解决方案
asp下的一个很简单的验证码程序
asp又一个分页的代码例子
asp实现防止从外部提交数据的三种方法

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 146 ::
收藏到网摘: 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