asp在线裁切/剪切图片(需AspJpeg支持)
作者:wang 日期:2009-12-15
效果如图:
准备工作
1.jquery.Jcrop 下载 主页
2.Aspjpeg 下载 主页
index.asp
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
准备工作
1.jquery.Jcrop 下载 主页
2.Aspjpeg 下载 主页
index.asp
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
评论: 0 | 引用: 0 | 查看次数: 4459
发表评论