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

作者:袖梨 2022-07-02

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Response.Expires = 0

Pic = Request("p")
PointX = CInt(Request("x"))
PointY = CInt(Request("y"))
Cutw"))
Cuth"))
Picpw"))
Picph"))

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
%>

相关文章

精彩推荐