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 |
新聞熱點
疑難解答