明辉手游网中心:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

simple

[摘要]<HTML><HEAD><TITLE>AspJpeg 1.0 - Simple.asp</TITLE></HEAD><BODY><% ' Create instance of AspJpeg Set ...

<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="http://www.okasp.com/techinfo/images/clock.jpg"><P>

Thumbnail (50% reduction):<BR>
<IMG SRC="http://www.okasp.com/techinfo/images/clock_small.jpg"><P>

<%
    Response.Write "<HR>AspJpeg expires on " & Jpeg.Expires
%>

</BODY>
</HTML>



标签:simple