您的位置:首页精文荟萃软件资讯 → 用ASP生成XBM数字图片

用ASP生成XBM数字图片

时间:2004/10/7 19:16:00来源:本站整理作者:蓝点我要评论(0)


            
             
              
             
            

               
               

            



            XBM图片是一个纯文本的文件,可以用ASP来自动生成。可以用它来使用网站登陆的验证码;
我们用记事本打开该文件进行分析:
其文件结构为:
#define counter_width 48
#define counter_height 9
static unsigned char counter_bits[]={7c,3c,7c,3c,70,3c,fe,7c,fe,7c,78,7c,ee,ee,ee,ee,7c,ee,e0,ee,60,ee,74,ee,70,fe,30,fe,70,fe,38,ec,e0,ec,70,ec,1c,e0,ee,e0,70,e0,fe,7e,fe,7e,70,7e,fe,3c,7c,3c,70,3c}
文件扩展名为:.xbm

#define counter_width 48 '这儿定义的是图片的宽度,一般为8的倍数
#define counter_height 9 '这儿定义的是图片的高度,是任意的。
static unsigned char counter_bits[]={7c,3c,7c,3c,70,3c,fe,7c,fe,7c,78,7c,ee,ee,ee,ee,7c,ee,e0,ee,60,ee,74,ee,70,fe,30,fe,70,fe,38,ec,e0,ec,70,ec,1c,e0,ee,e0,70,e0,fe,7e,fe,7e,70,7e,fe,3c,7c,3c,70,3c} '这儿是图片用来显示内容的十六进制的代码

正如static unsigned char英文意思为静态的,无符号的,烧焦的。它只能用来显示黑白两种颜色。二进制中的1将来用显示为黑色,0为白色。

下面为0~9数字的二进制数组(其中的图片样式仅试用于本例。如果需要别的0~9数字样式,请另自行生成)

'此处声明0~9绘图用数组

dim num(9,8)
'数字0
num(0,0)="0x38"
num(0,1)="0x7c"
num(0,2)="0xee"
num(0,3)="0xee"
num(0,4)="0xee"
num(0,5)="0xee"
num(0,6)="0xee"
num(0,7)="0x7c"
num(0,8)="0x38"
'数字1
num(1,0)="0x70"
num(1,1)="0x78"
num(1,2)="0x7c"
num(1,3)="0x74"
num(1,4)="0x70"
num(1,5)="0x70"
num(1,6)="0x70"
num(1,7)="0x70"
num(1,8)="0x70"
'数字2
num(2,0)="0x7c"
num(2,1)="0xfe"
num(2,2)="0xee"
num(2,3)="0xe0"
num(2,4)="0x70"
num(2,5)="0x38"
num(2,6)="0x1c"
num(2,7)="0xfe"
num(2,8)="0xfe"
'数字3
num(3,0)="0x7c"
num(3,1)="0xfe"
num(3,2)="0xee"
num(3,3)="0x60"
num(3,4)="0x30"
num(3,5)="0xe0"
num(3,6)="0xee"
num(3,7)="0xfe"
num(3,8)="0x7c"
'数字4
num(4,0)="0x70"
num(4,1)="0x78"
num(4,2)="0x7c"
num(4,3)="0x76"
num(4,4)="0x77"
num(4,5)="0xff"
num(4,6)="0xff"
num(4,7)="0x70"
num(4,8)="0x70"
'数字5
num(5,0)="0xfc"
num(5,1)="0xfc"
num(5,2)="0x0c"
num(5,3)="0x7e"
num(5,4)="0xfe"
num(5,5)="0xe0"
num(5,6)="0xee"
num(5,7)="0xfe"
num(5,8)="0x7c"
'数字6
num(6,0)="0x78"
num(6,1)="0xfc"
num(6,2)="0x0e"
num(6,3)="0x6e"
num(6,4)="0xfe"
num(6,5)="0xee"
num(6,6)="0xee"
num(6,7)="0xfc"
num(6,8)="0x78"
'数字7
num(7,0)="0xfe"
num(7,1)="0xfe"
num(7,2)="0x60"
num(7,3)="0x70"
num(7,4)="0x38"
num(7,5)="0x38"
num(7,6)="0x18"
num(7,7)="0x1c"
num(7,8)="0x1c"
'数字8
num(8,0)="0x7c"
num(8,1)="0xfe"
num(8,2)="0xee"
num(8,3)="0x7c"
num(8,4)="0x7c"
num(8,5)="0xee"
num(8,6)="0xee"
num(8,7)="0xfe "
num(8,8)="0x7c"
'数字9
num(9,0)="0x3c"
num(9,1)="0x7c"
num(9,2)="0xee"
num(9,3)="0xee"
num(9,4)="0xfe"
num(9,5)="0xec"
num(9,6)="0xe0"
num(9,7)="0x7e"
num(9,8)="0x3c"

相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 360快剪辑怎么使用 36金山词霸如何屏幕取词百度收购PPS已敲定!3

最新文章 微信3.6.0测试版更新了微信支付漏洞会造成哪 360快剪辑怎么使用 360快剪辑软件使用方法介酷骑单车是什么 酷骑单车有什么用Apple pay与支付宝有什么区别 Apple pay与贝贝特卖是正品吗 贝贝特卖网可靠吗

人气排行 xp系统停止服务怎么办?xp系统升级win7系统方电脑闹钟怎么设置 win7电脑闹钟怎么设置office2013安装教程图解:手把手教你安装与qq影音闪退怎么办 QQ影音闪退解决方法VeryCD镜像网站逐个数,电驴资料库全集同步推是什么?同步推使用方法介绍QQ2012什么时候出 最新版下载EDiary——一款好用的电子日记本