<%
Function imgtmlogo(imgpath)
'如果支持水印组件就加入图片水印功能imgpath=formPath&fname
		If IsObjInstalled("Persits.Jpeg") Then
           Set Jpeg = Server.CreateObject("Persits.Jpeg")
		   Jpeg.RegKey = "48958-77556-02411" '水印组件注册码
           Jpeg.Open Server.mappath(imgpath)
           '添加图片水印
           Set Logo = Server.CreateObject("Persits.Jpeg")
		   Logo.RegKey = "48958-77556-02411" 
           Logo.Open Server.MapPath("images/tmlogo.gif") 'tmlogo.gif你的透明logo
           Jpeg.DrawImage Jpeg.width-112, Jpeg.height-50, Logo, 0.3, &HFFFFFF '0.3为透明程度,112,50为透明logo的宽高,透明颜色FFFFFF
           Jpeg.Save Server.mappath(imgpath)
		else
		   response.write "你的系统不支持水印组件,请先<a href=http://www.ftbbs.cn/soft/AspJpeg.rar>下载</a>安装!"
		   response.End()
		end if
		'水印功能结束
End Function
'生成缩略图函数
Function bigtojpg(picfilename,xpicfilename)
    Set Jpeg = Server.CreateObject("Persits.Jpeg")
	Jpeg.RegKey = "48958-77556-02411"		
    Jpeg.Open Server.mappath(picfilename)
    Jpeg.Width =84 'Jpeg.OriginalWidth / 2
    Jpeg.Height =84 'Jpeg.OriginalHeight / 2
	Jpeg.Save Server.mappath(xpicfilename)
    'Jpeg.Save xpicfilename
    Set Jpeg = Nothing
End Function
%>