您现在的位置: 万盛学电脑网 >> 程序编程 >> 网络编程 >> asp编程 >> 正文

asp 利用Persits.jpeg组件生成图片

作者:佚名    责任编辑:admin    更新时间:2022-06-22

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
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
%>