simple
发表于:2007-06-30来源:作者:点击数:
标签:
HTML HEAD TITLEAspJpeg 1.0 - Simple.asp/TITLE /HEAD BODY % ‘’ Create instance of AspJpeg Set Jpeg = Server.CreateObject(Persits.Jpeg) ‘’ Compute path to source image Path = Server.MapPath(images) quot;dodge_viper.jpg ‘’ Open source im
<HTML>
<HEAD>
<TITLE>AspJpeg 1.0 - Simple.asp</TITLE>
</HEAD>
<BODY>
<%
‘’ Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
‘’ Compute path to source image
Path = Server.MapPath("images") & "dodge_viper.jpg"
‘’ Open source image
Jpeg.Open Path
‘’ Decrease image size by 50%
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2
‘’ Apply sharpening if necessary
‘’ Jpeg.Sharpen 1, 130
‘’ create thumbnail and save it to disk
Jpeg.Save Server.MapPath("images") & "clock_small.jpg"
%>
Original Image:<BR>
<IMG SRC="images/clock.jpg"><P>
Thumbnail (50% reduction):<BR>
<IMG SRC="images/clock_small.jpg"><P>
<%
Response.Write "<HR>AspJpeg expires on " & Jpeg.Expires
%>
</BODY>
</HTML>
原文转自:http://www.ltesting.net