Function Newshuiyin(syname) DIM PreviewSetting PreviewSetting = Split(Newasp.PreviewSetting, ",") If UBound(PreviewSetting) < 15 Then PreviewSetting = Split("999,1,2,110,90,www.newasp.cn,12,#FF0000,Arial,0,images/WaterMap.gif, 0.8,#0066FF,100,35,0", ",") End If if CInt(PreviewSetting(2)) = 0 Then exit function '关闭水印退出 dim Jpeg dim Draw_X,Draw_Y dim Draw_ImageWidth dim Draw_ImageHeight dim Photo dim PhotoPath,Draw_Graph dim Logo dim LogoPath,DrawGraph,Transition_Color ' 建立图片对象 Set Jpeg = Server.createObject("Persits.Jpeg") ' 图片位置 PhotoPath = syname ' 打开图片 Jpeg.Open PhotoPath Draw_X = DrawImage_X(Jpeg.OriginalWidth,Draw_ImageWidth,2,CInt(PreviewSetting(15))) Draw_Y = DrawImage_y(Jpeg.Originalheight,Draw_ImageHeight,2,CInt(PreviewSetting(15))) ' 建立LOGO对象 Set Logo = Server.createObject("Persits.Jpeg") ' LOGO位置 LogoPath = Server.MapPath("/") & "/images/WaterMap.gif" ' 打开LOGO Logo.Open LogoPath ' 设置LOGO大小 Logo.Width =Trim(PreviewSetting(13)) Logo.Height = Trim(PreviewSetting(14)) ' 设置图片水印位置,LOGO 透明度,抽取 LOGO 背景颜色(白色),并删除 'Draw_X, Draw_Y, Logobox, Draw_Graph,Transition_Color,90 '// 加入图片的 位置价坐标(添加水印图片) Jpeg.DrawImage Jpeg.OriginalWidth /4 , Jpeg.OriginalHeight-25, Logo,30 'Jpeg.DrawImage Draw_X,Draw_Y, Logo, Draw_Graph,Transition_Color,90 ' 保存文件 Jpeg.Save syname ' 注销对象 Set Jpeg=nothing End Function Function SlT(sltname) 'modify by qq 850268891 Dim Rndname dim Rndname2 DIM PreviewSetting PreviewSetting = Split(Newasp.PreviewSetting, ",") If UBound(PreviewSetting) < 15 Then PreviewSetting = Split("999,1,2,110,90,www.newasp.cn,12,#FF0000,Arial,0,images/WaterMap.gif, 0.8,#0066FF,100,35,0", ",") End If If Len(NewAsp.BokeccUnion(2)) < 5 Then NewAsp.BokeccUnion(2) = "plugin.swf" dim jpeg,ranNum Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open sltname Jpeg.Width = Trim(PreviewSetting(3)) Jpeg.Height = Trim(PreviewSetting(4)) randomize ranNum=int(999*rnd) Rndname2=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum &".jpg" Rndname=Server.MapPath("/article/uploadsmall") & "/" & Rndname2 Jpeg.Save Rndname SlT= "uploadsmall" & "/" & Rndname2 set Jpeg=nothing End Function |
strFileExt = LCase(Mynewasp.GetFileExtName(FileNameArray(i))) |
If strFileExt = "gif" Then NewsImageUrl = FileNameArray(i) NewsImageUrl = SlT(Server.MapPath("/article/" & NewsImageUrl)) Exit For End If If strFileExt = "jpg" Then NewsImageUrl = FileNameArray(i) NewsImageUrl = SlT(Server.MapPath("/article/" & NewsImageUrl)) Exit For End If If strFileExt = "png" Then NewsImageUrl = FileNameArray(i) NewsImageUrl = SlT(Server.MapPath("/article/" & NewsImageUrl)) Exit For End If If strFileExt = "bmp" Then NewsImageUrl = FileNameArray(i) NewsImageUrl = SlT(Server.MapPath("/article/" & NewsImageUrl)) Exit For End If |
新闻热点
疑难解答