<!--#include file="num.asp"--> <% Dim Image Dim Width, Height Dim num Dim digtal Dim Length Dim sort Length = 10 '自定計數器長度
Redim sort( Length )
num = 62275 '計數器的值 digital = "" For I = 1 To Length -Len( num ) '補0 digital = digital & "0" Next For I = 1 To Len( num ) digital = digital & Mid( num, I, 1 ) Next For I = 1 To Len( digital ) sort(I) = Mid( digital, I, 1 ) Next Width = 8 * Len( digital ) '圖像的寬度 Height = 10 '圖像的高度,在本例中為固定值
Response.ContentType="image/x-xbitmap"
hc=chr(13) & chr(10)
Image = "#define counter_width " & Width & hc Image = Image & "#define counter_height " & Height & hc Image = Image & "static unsigned char counter_bits[]={" & hc
For I = 1 To Height For J = 1 To Length Image = Image & a(sort(J),I) & "," Next Next