'----------------------------------
'创建预览图片及打水印:call CreateView(文件的路径,要添加的水印图片文件)
'Design by Seven (See7di@Gmail.com)
Function CreateView(imagename,img,inttype)
Dim Object,objFont,Obj,LogoPath,sWidth,sHeight
sWidth = LogoPicWid'//LOGO的宽
sHeight = LogoPicHig'//LOGO的高
LogoPath = Server.MapPath(img)'//LOGO路径
Set Obj = Server.CreateObject("Persits.Jpeg")'//建立LOGO对象
Set Object = Server.CreateObject("Persits.Jpeg")'//建立原图对象
On Error resume Next
Obj.Open LogoPath'//读取LOGO
If err>0 Then
Response.Write ("对不起,获取LOGO图片文件失败!")
EXIT Function
End if
Object.Open Trim(Server.MapPath(imagename))'//读取原图
If err>0 Then
Response.Write ("对不起,获取需要处理的图片文件失败!")
EXIT Function
End if
Obj.Width = sWidth'//加入图片的原宽度
Obj.Height = sHeight'//加入图片的原高度
'\\如果原图比LOGO大
If Object.width>(Cint(Obj.Width)*2) and Object.Height>(Cint(Obj.Height)*2) Then
strDo="yes"
End if