aspjpeg组件实现加水印函数的调用方法:
<%printwater "/images/水印图片.gif","/uploadfile/上传图片.jpg") %>
函数:
<% function printwater(waterpath,upfilepath) dim logobox,logopath,ogvbox logopath = server.mappath(waterpath) set logobox = server.createobject("persits.jpeg") logobox.open logopath logobox.width = 108 logobox.height = 65 set ogvbox = server.createobject("persits.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 %>