aspjpeg 添加PNG水印 最简洁代码

<%
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open "D:/webcar/wwwroot/ModelPic/"&request("model")&"/"&request("id")
if request("w")<>"" then
    if jpeg.OriginalWidth>int(request("w")) then jpeg.Width = request("w")
    end if
    'jpeg.Height = jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth
    if request("h")="" then
    jpeg.Height = jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth
    else
    jpeg.Height=request("h")
    if request("w")="" then jpeg.Width =  jpeg.OriginalWidth * jpeg.Height / jpeg.OriginalHeight end if
end if
Jpeg.Canvas.DrawPNG jpeg.Width-190, jpeg.Height-80, "D:/webcar/wwwroot/image/sy.png"
Jpeg.SendBinary
%>

posted @ 2010-09-27 15:44  y0umer  阅读(189)  评论(0编辑  收藏  举报