<!--#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