自动生成缩略图,精彩图片生成小图
作者:cmscn 日期:2009-06-14
'----------------------------------水印修改开始----------------------------------------
Dim Photo,Logo,PhotoPath,LogoPath,Jpeg,Path
'头像水印修改
if lcase(uppath)="face" then
if lcase(upfile_name2)<>"gif" then
'创建缩微图
Set Jpeg = Server.CreateObject("Persits.Jpeg")'建立实例
Path = Server.MapPath(web_dim(6)&upload_path&uppath&"/"&upfile_name)'打开图片
Jpeg.Open Path
Jpeg.Width = 90
Jpeg.Height = 90
Jpeg.Save Server.MapPath(web_dim(6)&upload_path&uppath&"/"&upfile_name)
Set Jpeg = Nothing
end if
end if
'下载水印修改
if lcase(uppath)="down" then
'创建缩微图
Set Jpeg = Server.CreateObject("Persits.Jpeg")'建立实例
Path = Server.MapPath(web_dim(6)&upload_path&uppath&"/"&upfile_name)'打开图片
Jpeg.Open Path
Jpeg.Width = 240
Jpeg.Height = 180
Jpeg.Save Server.MapPath(web_dim(6)&upload_path&uppath&"/"&upfile_name)
Set Jpeg = Nothing
end if
'如果相片上传
If lcase(uppath)="gallery" then
if lcase(upfile_name2)="jpg" then
'创建缩微图
Set Jpeg = Server.CreateObject("Persits.Jpeg")'建立实例
Path = Server.MapPath(web_dim(6)&upload_path&uppath&"/"&upfile_name)'打开图片
Jpeg.Open Path
Jpeg.Width = 120
Jpeg.Height = 90
Jpeg.Save Server.MapPath(web_dim(6)&upload_path&uppath&"/"&"s"&upfile_name)
Set Jpeg = Nothing
'添写缩微图
tmpjs=tmpjs&"parent.document.all.spic.value='"&uppath&"/"&"s"&upfile_name&"';"
uptemp=uptemp&vbcrlf&"<script language=javascript>"&vbcrlf&tmpjs&vbcrlf&"</script>"
End If
end if
'----------------------------------水印修改结束----------------------------------------
评论: 0 | 引用: 0 | 查看次数: 449
发表评论