ASP生成数字相加求和的BMP图片验证码(2)
vNumberData(5) =
"1100000011110111111111011111111101000111110011101111111110111111111011110111101111011110111110000111"
vNumberData(6) =
"1111000111111011101111011111111101111111110100011111001110111101111011110111101111011110111110000111"
vNumberData(7) =
"1100000011110111011111011101111111101111111110111111110111111111011111111101111111110111111111011111"
vNumberData(8) =
"1110000111110111101111011110111101111011111000011111101101111101111011110111101111011110111110000111"
vNumberData(9) =
"1110001111110111011111011110111101111011110111001111100010111111111011111111101111011101111110001111"
'表示=
vNumberData(10) =
"1111111111111111111111111111111000000001111111111111111111111000000001111111111111111111111111111111"
'表示+
vNumberData(11) =
"1111111111111100111111110011111111001111100000000110000000011111001111111100111111110011111111111111"
Response.BinaryWrite ChrB(66) & ChrB(77) & ChrB(230) & ChrB(4) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) &_
ChrB(0) & ChrB(0) & ChrB(54) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(40) & ChrB(0) &_
ChrB(0) & ChrB(0) & ChrB(40) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(10) & ChrB(0) &_
ChrB(0) & ChrB(0) & ChrB(1) & ChrB(0)
Response.BinaryWrite ChrB(24) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(176) & ChrB(4) &_
ChrB(0) & ChrB(0) & ChrB(18) & ChrB(11) & ChrB(0) & ChrB(0) & ChrB(18) & ChrB(11) &_
ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0) &_
ChrB(0) & ChrB(0)
For i = 9 To 0 Step -1 '行
For ii = 0 To 3 '字数
For iii = 1 To 10 '像素点
if Mid(vNumberData(vCode(ii)), i * 10 + iii , 1) ="0" then '产生彩色点,减去一个固定值,可使颜色偏深
dim a,b,c
a=abs(Rnd * 256-60)
b=abs(Rnd * 256-128)
c=abs(Rnd * 256-60)
vColorData(0) = ChrB(a) & ChrB(b) & ChrB(c)
内容版权声明:除非注明,否则皆为本站原创文章。