• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • ASP Image 使用范例

    發表于:2007-06-30來源:作者:點擊數: 標簽:
    使用ASPImage組件僅需以下步驟: 建一個對象 設置若干屬性 調用SaveImage方法 以下代碼舉例說明如何在 vb script中使用ASPImage組件,在這個例子中我們要建立一個漸進填充的字樣為 welcome to的文字圖片: Set Image = Server.CreateObject(AspImage.Image) r
    使用ASPImage組件僅需以下步驟:

    建一個對象
    設置若干屬性
    調用SaveImage方法
    以下代碼舉例說明如何在vbscript中使用ASPImage組件,在這個例子中我們要建立一個漸進填充的字樣為 "welcome to"的文字圖片:
    Set Image = Server.CreateObject("AspImage.Image")

    rem Set various font parameters
    Image.FontColor = vbBlack
    Image.Italic = True
    Image.Bold = True
    Image.FontName = "Arial"
    Image.FontSize = 12
    Image.PadSize = 10

    rem Calculate how big our text info is and set the image to this size
    rem This has to be done since we want to fill the area with a gradient
    strMessage = "Welcome to"
    Image.MaxX = Image.TextWidth (strMessage)
    Image.MaxY = Image.TextHeight (strMessage)

    rem Create a one way gradient
    Image.GradientOneWay vbRed, vbWhite, 0

    rem Print our string to the image
    Image.TextOut strMessage, Image.X, Image.Y, false

    rem Set the filename and save
    rem NOTE: You should gen the filename dynamically for multiuser usage
    Image.FileName = "d:\.netpub\wwwroot\images\msg1.jpg"
    if Image.SaveImage then
    rem The image was saved so write the <img src> tag out for the browser to pick up
    Response.Write "<img src=""/images/msg1.jpg""><br>"
    else
    rem Something happened and we couldn憭t save the image so just use an HTML header
    rem We need to debug the script and find out what went wrong
    Response.Write "<h2>Welcome to</h2>
    end if



    通過使用SaveImage方法我們可以得知圖片是否已經正確保存了。一般導致圖片不能正確保存的原因是圖片的保存路徑不合法或者對該路徑沒有寫的權限。

    GIF Animations
    圖片能被加載或進行處理,并且可以通過調用AddImage方法將這些修改保存到一個活動順序的動畫中。在soianim.asp中有個簡單的GIF動畫例子,這個文件已打包到ASPImage的ZIP文件中。

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>