自动生成缩略图,精彩图片生成小图


'----------------------------------水印修改开始----------------------------------------
          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
'----------------------------------水印修改结束----------------------------------------

文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 449
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭