genbmp.asp
来自「Vc.Net入门与提高源码」· ASP 代码 · 共 31 行
ASP
31 行
<%
' Get the scale of the bitmap
scale = CInt(Request.Form("scale"))
If scale <0 Or scale > 10 Then
Response.Write "Please select a scale between 1 and 10"
Response.End
End if
' Create a bitmap picture
Set pPicture = CreateObject("Picture.Bitmap")
' And draw a grid where each odd pixel coordinates is in black
For y = 0 to 15
For x = 0 to 15
CalculatedColor = x
If Request.Form(x & "-" & y) = "ON" Then
For px = 0 to scale - 1
For py = 0 to scale - 1
pPicture.Pixels.Color(scale*x+px, scale*y+py) = CalculatedColor
Next
Next
End If
Next
Next
'Send the bitmap to the ASP Response stream object for IIS5
pPicture.SaveToStream Response
' Or to the ASP Response object directly using SAFEARRAYS
'pPicture.SavePictureToIIS4Response Response
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?