人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當(dāng)前位置:蘿卜系統(tǒng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁面

ASP Image 運用范例

ASP Image 運用范例

更新時間:2022-09-12 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):


使用ASPImage組件僅需以下步驟:

建一個對象
設(shè)置若干屬性
調(diào)用SaveImage方法
以下代碼舉例說明如何在vbscript中使用ASPImage組件,在這個例子中我們要建立一個漸進(jìn)填充的字樣為 "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:\inetpub\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=""http://www.okasp.com/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方法我們可以得知圖片是否已經(jīng)正確保存了。一般導(dǎo)致圖片不能正確保存的原因是圖片的保存路徑不合法或者對該路徑?jīng)]有寫的權(quán)限。

GIF Animations
圖片能被加載或進(jìn)行處理,并且可以通過調(diào)用AddImage方法將這些修改保存到一個活動順序的動畫中。在soianim.asp中有個簡單的GIF動畫例子,這個文件已打包到ASPImage的ZIP文件中。(出處:熱點網(wǎng)絡(luò))

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 延长县| 沾化县| 沐川县| 顺昌县| 龙胜| 西城区| 肇源县| 衡阳市| 盱眙县| 汨罗市| 岳西县| 上饶县| 长汀县| 宁南县| 东源县| 福安市| 黔西县| 张家港市| 松江区| 琼结县| 雷山县| 乌兰察布市| 乡宁县| 张家川| 蚌埠市| 沂南县| 息烽县| 白水县| 库伦旗| 金乡县| 娱乐| 航空| 永昌县| 乌审旗| 江源县| 乌兰浩特市| 永州市| 长沙县| 德保县| 柳江县| 运城市|