当前位置:系统之家 > 技术开发教程 > 详细页面

simple

simple

更新时间:2022-09-14 文章作者:未知 信息来源:网络 阅读次数:


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

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行