位图处理....还在学习中

一、BMP图形文件的格式: (1)位图文件头,共14字节 前2字节: BM --- 任何BMP图象文件的开头 往下4字节: 32位数 --文件大小 再读2字节: 保留字 再读2字节: 保留字 再读4字节: 从文件头到位图实际数据的偏移字节数 以上为位图文件头,共14字节; Win32中用结构BITMAPFILEHEADER表示 (2)以下为位图信息,共40字节 读4字节: 指定这部分为40字节(?) 读4字节: 图象宽度 读4字节: 图象高度 读2字节: 必须是1(这里用来处理图象的宽) 读2字节: 位图的位数 读4字节: 位图是否压缩:BI_RGB(未压缩), 读4字节: 实际位图数据占用字节数, 以上为位图信息,共40字节; Win32中用结构BITMAPEINFOHEADER表示 (3)接着是调色板: 调色板是一数组,共biClrUsed个元素,每个元素是一tagRGBQUAD结构为4字节(r,g,b,保留值) 注意:这一块的大小视各副图形图片不同而有所不同 (4)图象实际数据 对于用调色板的位图,图象数据是该象素的索引值,对于真彩色图,即(r,g,b) 注意:每行的字节数必须是4的倍数,如果不是,要补齐;对于bmp图,数据是从下到上 从左到右列的(即:从文件中最先读到的是图象最下面左边的第一象素) 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111110001111111110011111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111100011111111000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111110001011111100000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111110000011111100010111111000001111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111100011111000011111100000111111000000111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111100111110000011111100000011110000001111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000011110000011111100001111110000001111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110001111100000011111100001111101000001111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000011110001111111000001111100000011111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000011110000111111100001111100000011111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000111010001111111000011111000000011111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000011110001111110100111111000000111110001111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110000111100001111111000111111000011111100000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111100000111110001111110001111111000001111110000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110000111100001111111000111111010111111000000001111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000111100001111100001111110001111110000111111000001111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100011111110001111110001111100011111110001111110000000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000111110000111100001111110001111110011111110000000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000111110000111100011111110011111110001111110000001111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000111110001111100011111110011111100111111110000011111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000111101000111100001111100011111100111111100001111111110111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000111110001111110011111100011111010011111100111111111000001111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000111110000111100001111100011111000111111100011111110000000111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000111110001111100011111100011111100111111000111111110000001111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100001111110000111101011111100011111000111111001111111100000111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100001111111000111100001111000011111000111111000111111000001011111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000111111000111100011111100011111000111110001111110000001011111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000111110000111100001111100111110011111110001111100000001111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000111111000111100111111000111110001111100011111000000011111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111000111111000111100011111000111110001111100001110100001011111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111000111111000111100011111000011110001111000011110000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111100011111000111100001111000111110001111000111100000111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111000111111100111110011111000111100011110000111000001111111110001111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111000111111100011111100111100001111000111110011110001011100111111111101000111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111110000111111110011111100111110011111000111100011110001110000111111111100000011111111111111111111111111111111111111111111111111111111 1111111111111111111111111111100010111111100011111100111100001111000111100011000011110001111111110000001011111111111111111111111111111111111111111111111111111111 1111111111111111111111111111101000011111110011111100111110011111000111100111100011110001111111110000001101111111111111111111111111111111111111111111111111111111 1111111111111111111111111111100000011111111011111110011100001110001111000011000011110011111111000000011111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111110000011111111011111110011110001111000111100111100011100011111111000000111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111000011111111001111100111110001110000111000111000111100111111100001111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111110100111111111010111110011110011111001111000111001111001111111000000111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111100001111111101111111011110001111000111010111000110101111111000111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111110011111111100111110001110001111001111001111001110001111100000111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111100001111111100111111011110001110001110001100101100011110000011111111110011111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111001111111100111111001111001111001111000110011100011110000011111111000000111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111000111111100011111001110001111001111001110111100011100001111111111000000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111100011111110001111001111011111001111001100110000011000101111111110010000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110001111100011111001111001110000110011100110001110000111111111100000000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000111111001111000111001111001110001100100001110001111111111000000000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000001110000111100111001111001111011000100010110011111111110000000000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100001111000111000111000000001000001001000011110011111110100000000000011111111111111111110111111111111111111111111111111111 1111111111111111111111111111111111111110000111100011100010000000000010111000000111101111111110010000000000111111111111111111100011111111111111111111111111111111 1111111111111111111111111111111111111111000011000001100000000000000000000001000111000111111100000000000000011111111111111111000000011111111111111111111111111111 1111111111111111111111111111111111111111111011110001000000000000000000000000001111001111110000000000000001111111111111111111100000011111111111111111111111111111 1111111111111111111111111111111111111111111111111000000000000000000000000000001110001111111000000000000000111111111111111111000000001111111111111111111111111111 1111111111111111111111111111111111111111110101100000000000000000000000000000001100111111110000000000000001111111111111111110000000001111111111111111111111111111 1111111111111111001101111111111111111111111110100000000000000000000000000000000010011111100000000000000001111111111111111100000000000011111111111111111111111111 1111111111111111101111111111111111111111111100000000000000000000000000000000000000111111110000000000000001111111111111111100000010000000111111111111111111111111 1111111111111111110100111111111111111111111100000000000000000000000000000000000000011111110000000000000011111111111111110100000000000000011111111111111111111111 1111111111111111110010111111111111111111110000000000000000000000000000000000000000001111100000000000000011111111111111110000000000000000001111111111111111111111 1111111111111111110110111111111111111111001000000000000000000000000000000000000000001111100000000000000011111111111111100000000000000000000111111111111111111111 1111111111111111110010011111111111111101000000000000000000000000000000000000000000000011000000000000000001111111111111110000000000000000000011111111111111111111 1111111111111111111011011111111000000000000000000000000000000000000000000000000000000001100000000100000111111111111111000000000000000100000011111111111111111111 1111111111111111111101001111111000000000000000000000010000000000000000000000000000000000000000000000000011111111111110000000000000000000000001111111111111111111 1111111111111111111110101111010000000000000000000000000000000000000000000000000000000000000000000000000111111111111100000000000000000000000011111111111111111111 1111111111111111111110000010000000000000000000000000000000000000000000000000000000000000000000000000000111111111111100000000000000000000000000111111111111111111 1111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111100000000000000000000000010111111111111111111 1111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111000000000000000000000000000111111111111111111 1111111111111111111111111000000000000000000000010000000000000000000000000000000000000000000000000000011111111111110000000000000000000000000000011111111111111111 1111111111111111111111111000000000000000000000000000000000000000000100100000000000000000000000000000101111111111000000010000000000000010000000111111111111111111 1111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000111111111110000000000000000000000000000000011111111111111111 1111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000111111110000000000000000000000000000000000011111111111111111 1111111111111111111111111000000000000000000000000000000000000000000000000000000000000000001000000000001111100000000000000000000100000000000000111111111111111111 1111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000011111111111111111 1111111111111111111111110000000000000001000000000000000100000000000000000100000000000000000000000000000000000000000000000000000000000000000000011111111111111111 1111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111 1111111111111111111111100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000111111111111111111 1111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000100000000000000000000111111111111111111 1111111111111111111111000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000111111111111111111 1111111111111111111110000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000001000001001111111111111111111 1111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111 1111111111111111111100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000011111111111111111111 1111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100011111111111111111111 1111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000000011111111111111111111 1111111111111111100000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111 1111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111 1111111111111101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000111111111111111111111 1111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000001111111111111111111111 1111111111110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000001111111111111111111111 1111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000001111111111111111111111 1111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000010000000011111111111111111111111 1111111111110000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000001000000000000000000100011111111111111111111111 1111111111111100000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000111111111111111111111111 1111111111111111001000000000000100000000000000001000000000000000000000010000000000000000010000000000000000000000000101100000001000000000011111111111111111111111 1111111111111111110000000000000000000000000000000010000000000000000000000100000000100000000000000000000000001000000011110000000000000101111111111111111111111111 1111111111111111111111010000000000000000000000000000010000000000000000000000000000000000000000000001000000000000000111111000000000000000111111111111111111111111 1111111111111111111111111101000000000000000000000000000000000000000000000000000000000000000000001000000000000000000111111101000000000001111111111111111111111111 1111111111111111111111111010000000000000000000000000000000000000000000000000100000000000000000000000000000000000001111111110000000000001111111111111111111111111 1111111111111100111111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111100000000001111111111111111111111111 1111111111110100010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111110000000111111111111111111111111111 1111111111110000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000001100110111111111110100000111111111111111111111111111 1111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001101011111111111100001111111111111111111111111111 1111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100011111111111111001111111111111111111111111111 1111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111 1111111111110000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001111111111111111111111111111111111111111111111 1111111111111000001111011111011000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111 1111111111111111111111111111101111010000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111 1111111111111111111111111111111111111010000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111 1111111111111111111111111111111111110100000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111000001101000100000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000000111000000000000000000000000000100000000000000000000000000000000001111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000001111000000000000000000000000000000001000000000000000000000000000111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000001111000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000000111000000000000000000000000000000000000000100000000000000000000111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000001111000000000001000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111100000001111000000000000000000000000000000000000000000000000000000100000111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000001111000000000000000010000000000000000000000000000000000001010001111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000000111100000000000000000000000000000000000000000000100000000000101111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000011110000000000000000000000000000000000001100000000000100001000101111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000011111000000000000000000000000000000000001100000000000000000000000111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000001110000000000000000000000000000000000000110100000000000000000001111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000000110000000000000000000000000000000000000000000000000000000000011001011111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000001010000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000001000000000000000000000000000000000000000000000000000000000001011111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000101111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000010111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000010000000000000000000000000001000000011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000001011011011111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000100000000000000000000000000000000000010000100111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000010111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000000000000000000000000100000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111000000000000000000000000000000000000000100000000000000001111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111110000000000000001010000000000000000000000000000000000001011111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111100000000000000100000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111000000000000010000000000000010000000010100000000000111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111100000000101000000000000000000000000011000000000000001111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111110100000110100000000000000000000000000100000001011111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111010000011100000000000000000000000000110000000111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111000000100000000000000000000001000010000000000001011111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111100000000000000000000000000010110110000000000000111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111000010000000010000000001111111111000000000001101111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111101000000010111000001001011111111101001010110111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111100000000110000111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111110000001111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111100000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111110000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111011011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
阅读更多

没有更多推荐了,返回首页