function water_jpeg(filenameB)
dim water_file,Logo
water_file = Server.MapPath("../logo_water.png")
filenameB = Server.MapPath(filenameB)
dim Jpeg
set Jpeg = Server.CreateObject("Persits.Jpeg")
if -2147221005=Err then
Response.write "没有这个组件,请安装!" '检查是否安装
AspJpeg组件
Response.end()
end if
Jpeg.Open (filenameB) '打开图片
if Jpeg.width >= 500 and Jpeg.height >= 200 then
if err.number then
Response.write"打开图片失败,请检查路径!"
Response.end()
end if
set Logo = Server.CreateObject("Persits.Jpeg")
Logo.Open water_file '打开水印图片
Jpeg.DrawImage Jpeg.width-300, Jpeg.height-90,
Logo,0.8,&HFFFFFF '参数顺序为:水平坐标,垂直坐标,logo地址,透明度,抽
取颜色(&H表示16进制)
Jpeg.Save filenameB '保存文件
set Logo = nothing
end if
set Jpeg = nothing
end function
本站原创.net教程">www.111cn.net