斑竹请帮个忙,高手们也来说说

flyingworm 2003-05-27 11:21:01
急需知道bmp文件的格式。请帮忙找找。谢啦。就是哪一段是文件头,哪个字节规定了颜色书等等。。。。。
...全文
83 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Sean918 2003-05-30
  • 打赏
  • 举报
回复
http://xiangmeng.nease.net/word/bmp_format.htm

满意否?
flyingworm 2003-05-27
  • 打赏
  • 举报
回复
有没有简单点的?
flyingworm 2003-05-27
  • 打赏
  • 举报
回复
和我手上的资料一样啊。可我是英盲,看不懂啊。
tserpent 2003-05-27
  • 打赏
  • 举报
回复
bmp contents

the following table contains a description of the contents of the bmp file. for every field, the file offset, the length and the contents will be given. for a more detailed discussion, see the following chapters.

offset
field
size
contents

0000h
identifier
2 bytes
the characters identifying the bitmap. the following entries are possible:

態m’ - windows 3.1x, 95, nt, …

態a’ - os/2 bitmap array

慍i’ - os/2 color icon

慍p’ - os/2 color pointer

慖c’ - os/2 icon

慞t’ - os/2 pointer

0002h
file size
1 dword
complete file size in bytes.

0006h
reserved
1 dword
reserved for later use.

000ah
bitmap data offset
1 dword
offset from beginning of file to the beginning of the bitmap data.

000eh
bitmap header size
1 dword
length of the bitmap info header used to describe the bitmap colors, compression, … the following sizes are possible:

28h - windows 3.1x, 95, nt, …

0ch - os/2 1.x

f0h - os/2 2.x

0012h
width
1 dword
horizontal width of bitmap in pixels.

0016h
height
1 dword
vertical height of bitmap in pixels.

001ah
planes
1 word
number of planes in this bitmap.

001ch
bits per pixel
1 word
bits per pixel used to store palette entry information. this also identifies in an indirect way the number of possible colors. possible values are:

1 - monochrome bitmap

4 - 16 color bitmap

8 - 256 color bitmap

16 - 16bit (high color) bitmap

24 - 24bit (true color) bitmap

32 - 32bit (true color) bitmap

001eh
compression
1 dword
compression specifications. the following values are possible:

0 - none (also identified by bi_rgb)

1 - rle 8-bit / pixel (also identified by bi_rle4)

2 - rle 4-bit / pixel (also identified by bi_rle8)

3 - bitfields (also identified by bi_bitfields)

0022h
bitmap data size
1 dword
size of the bitmap data in bytes. this number must be rounded to the next 4 byte boundary.

0026h
hresolution
1 dword
horizontal resolution expressed in pixel per meter.

002ah
vresolution
1 dword
vertical resolution expressed in pixels per meter.

002eh
colors
1 dword
number of colors used by this bitmap. for a 8-bit / pixel bitmap this will be 100h or 256.

0032h
important colors
1 dword
number of important colors. this number will be equal to the number of colors when every color is important.

0036h
palette
n * 4 byte
the palette specification. for every entry in the palette four bytes are used to describe the rgb values of the color in the following way:

1 byte for blue component

1 byte for green component

1 byte for red component

1 byte filler which is set to 0 (zero)

0436h
bitmap data
x bytes
depending on the compression specifications, this field contains all the bitmap data bytes which represent indices in the color palette.

2,541

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧