日韩精品中文字幕一区二区-日韩精品中文字幕一区-日韩精品中文字幕视频-日韩精品在线一区二区三区-第一页在线-第一福利视频

當前位置: 首頁IT技術 → 教你如何使用ASP Image

教你如何使用ASP Image

更多

這篇文章跟大家主要介紹到的是關于ASP Image 使用范例,希望能對大家有用。

使用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
  remThis 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
  remNOTE: You should gen the filename dynamically for multiuser usage
  Image.FileName = "d:inetpubwwwrootimagesmsg1.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.ddvip.net/web/ASP/searches/"/images/msg1.jpg""><br>"
  else
  rem Something happened and we couldn't save the image so just use an HTML header
  remWe 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文件中。

熱門評論
最新評論
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字數: 0/500 (您的評論需要經過審核才能顯示)
主站蜘蛛池模板: 美女xxx69爽爽免费观妞| 女友的男朋友| 流浪地球海报| 国产老阿姨| 婚前协议电视剧演员表| 古诗改编版搞笑大全| 爽文视频| 繁华在线观看| 香港部落 在线完整版| 广场舞100首视频| 韩国电影闵度允主演电影| 孙婉| 乔军| 言承旭电影| 八下数学练习册答案| 哥也要| 国家励志奖学金个人主要事迹1500字 | 十一码复式22块钱中奖对照表| 女孩们的周末| 汽水音乐官网| 太原教育电视台| 云月之恋简谱| 给我| 琪琪色影院| 我是特种兵免费观看完整版 | xiuren秀人网站入口| 巴霍巴利王2国语版在线观看免费| 姐姐的秘密电影| 7妹| 泰剧《一触即爱》| 六一儿童节小品剧本| 达科塔·高尤| 假男假女| 二年级最佳家长评语| 金秀贤real| 纳尼亚传奇4在线观看免费完整版 虞书欣新剧永夜星河免费观看 | 致命录像带2| 烽火硝烟里的青春演员表| 楼南光电影| 红楼梦小戏骨| 质量教育培训的首要内容是() (单选题) |