asp在线裁切/剪切图片(需AspJpeg支持)

效果如图:


准备工作

1.jquery.Jcrop  下载   主页

2.Aspjpeg   下载  主页

index.asp













1.上传文件


2.剪切合适尺寸(
)





3.预览  



4.查看下载剪切后图片(右键另存为)

      

右键另存为




pic.asp


<%
Response.Expires = 0

Pic = Request("p")
PointX = CInt(Request("x"))
PointY = CInt(Request("y"))
CutWidth = CInt(Request("w"))
CutHeight = CInt(Request("h"))
PicWidth = CInt(Request("pw"))
PicHeight = CInt(Request("ph"))

Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath(Pic)
Jpeg.Width = PicWidth
Jpeg.Height = PicHeight
Jpeg.Crop PointX, PointY, CutWidth + PointX, CutHeight + PointY
Response.ContentType = "image/jpeg"
Jpeg.SendBinary
%>
转载:http://hi.baidu.com/givebest/blog/item/0862afc35baee85fb319a89b.html

上一篇: asp根据IP地址获取物理位置(gb2312,utf-8)
下一篇: FSO操作类asp创建文件夹
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 4187
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 邮件地址支持Gravatar头像,邮箱地址不会公开.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 300 字 | UBB代码 开启 | [img]标签 关闭