标题:请教一道关于bmp图象解析的题
只看楼主
spike2007
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-2-14
 问题点数:0 回复次数:0 
请教一道关于bmp图象解析的题

以下是图片的结构:
File Header
Info Header
Image Data

Start Size Name stdvalue Meaning
0 2 Type 0x424D Must be "BM" to mean Bitmap
2 4 Size -- Size of the file in bytes
6 2 Reserved1 0 Must be 0
8 2 Reserved2 0 Must be 0
10 4 Offset 1078 Offset from byte 0 to bitmap data

The format for the Info Header is:
Start Size Name stdvalue Meaning
14 4 Size 40 The size of this header, in bytes
18 4 Width -- Width of the image in pixels
22 4 Height -- Height of the image in pixels
26 2 Planes 1 Number of planes in target (must be 0)
28 2 BitCount 8 Number of bits per pixel
30 4 Compression 0 Type of compression (0 = none)
34 4 SizeImage 0 Size of image data (0 if no compression)
38 4 XPelsPerMeter 0 Horizontal pixels per meter
42 4 YPelsPerMeter 0 Vertical pixels per meter
46 4 ClrUsed 0 Number of colors (if 0, calculated from BitCount)
50 4 ClrImportant 0 Number of important colors (if 0, all are important)

请教如何如何算出蓝绿红每种象素的平均值啊?

搜索更多相关主题的帖子: bmp 图象 解析 
2007-02-14 15:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-120955-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.156984 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved