详解重新测试ASP编程的内容
来源:爱站网时间:2020-09-18编辑:网友分享
不少朋友问水印测试(重新测试)在ASP编程中是怎么的,带着这个问题,接下来就跟随爱站技术频道小编来了解一下吧!
不少朋友问水印测试(重新测试)在ASP编程中是怎么的,带着这个问题,接下来就跟随爱站技术频道小编来了解一下吧!
注:如果你是用Fireworks来处理LOGO图片,在导出图片的时候用Alpha透明而不要用索引透明!
Dim Jpeg,Logo
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath(UploadDir&Request2.Form("LocalImage"))'打开图片
'添加文字水印
'Jpeg.Canvas.Font.Color = &HFF0000' 红色
'Jpeg.Canvas.Font.Family = "Verdana"
'Jpeg.Canvas.Font.Size = 15
'Jpeg.Canvas.Font.ShadowColor = &HCCCCCC '水印文字的阴影色彩。
'Jpeg.Canvas.Font.ShadowXoffset = 2 '阴影右偏移,负值则左偏移。
'Jpeg.Canvas.Font.ShadowYoffset = 2 '阴影下偏移,负值则右偏移。
'Jpeg.Canvas.Font.Quality = 1 '水印文字清晰度,从0~4
'Jpeg.Canvas.Font.ShadowColor = &H999999
'Jpeg.Canvas.Pen.Width = 1
'Jpeg.Canvas.Brush.Solid = True
'Jpeg.Canvas.Font.Bold = True
'Jpeg.Canvas.Print Jpeg.width-171, Jpeg.height-38, "blog.goalerCN.com"
'Jpeg.Canvas.Print Jpeg.width-201, Jpeg.height-20, "Copyright (c) Goaler's BLOG"
'添加水印图片
Set Logo = Server.CreateObject("Persits.Jpeg")
Logo.Open Server.MapPath("canvasLogo.gif")
IF(Jpeg.width-8>Logo.width AND Jpeg.height-8>Logo.height)THEN
Logo.Sharpen 0.7,120
Jpeg.DrawImage Jpeg.width-Logo.width-8,Jpeg.height-Logo.height-8,Logo,1,&HFFFFFF'抽取掉白色背景,水印位于右下角
Jpeg.Save Server.MapPath(UploadDir&Request2.Form("LocalImage"))'保存文件
END IF
Set Logo = Nothing'注销对象
Set Jpeg = Nothing'注销对象
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath(UploadDir&Request2.Form("LocalImage"))'打开图片
'添加文字水印
'Jpeg.Canvas.Font.Color = &HFF0000' 红色
'Jpeg.Canvas.Font.Family = "Verdana"
'Jpeg.Canvas.Font.Size = 15
'Jpeg.Canvas.Font.ShadowColor = &HCCCCCC '水印文字的阴影色彩。
'Jpeg.Canvas.Font.ShadowXoffset = 2 '阴影右偏移,负值则左偏移。
'Jpeg.Canvas.Font.ShadowYoffset = 2 '阴影下偏移,负值则右偏移。
'Jpeg.Canvas.Font.Quality = 1 '水印文字清晰度,从0~4
'Jpeg.Canvas.Font.ShadowColor = &H999999
'Jpeg.Canvas.Pen.Width = 1
'Jpeg.Canvas.Brush.Solid = True
'Jpeg.Canvas.Font.Bold = True
'Jpeg.Canvas.Print Jpeg.width-171, Jpeg.height-38, "blog.goalerCN.com"
'Jpeg.Canvas.Print Jpeg.width-201, Jpeg.height-20, "Copyright (c) Goaler's BLOG"
'添加水印图片
Set Logo = Server.CreateObject("Persits.Jpeg")
Logo.Open Server.MapPath("canvasLogo.gif")
IF(Jpeg.width-8>Logo.width AND Jpeg.height-8>Logo.height)THEN
Logo.Sharpen 0.7,120
Jpeg.DrawImage Jpeg.width-Logo.width-8,Jpeg.height-Logo.height-8,Logo,1,&HFFFFFF'抽取掉白色背景,水印位于右下角
Jpeg.Save Server.MapPath(UploadDir&Request2.Form("LocalImage"))'保存文件
END IF
Set Logo = Nothing'注销对象
Set Jpeg = Nothing'注销对象
以上就是关于重新测试ASP编程的内容了,对此有疑惑的小伙伴们,不知道这篇文章有没有帮助到你,更多详情咨询尽在js.aizhan.com。
上一篇:替换数据库内容详解
下一篇:自动采集入库怎么编写