BMP图像介绍

上个周老师让我们用C++读取一张BMP图片(并显示),本文主要介绍的是读取BMP文件,至于显示,是一些其他知识,就不在这里展开。

首先BMP文件的主要结构:

  • file header - all BMP images starts with a five elements file header. This has information about the file type, file size and location of the pixel data.
  • bitmap header - also named the info header. This has information about the width/height of the image, bits depth and so on.
  • color header - contains informations about the color space and bit masks
  • pixel data.

至于每个结构体里面的各个参数,这里贴上另外一篇博客:

资料链接:https://blog.youkuaiyun.com/xiajun07061225/article/details/5813726

最近看到了一篇博客介绍的内容很好:

资料链接:https://blog.youkuaiyun.com/lcalqf/article/details/42076169

一、存储格式

24位bmp图像数据是按BGR BGR......这样的格式存储的

bmp位图在存储时,图片数据部分的字节数一定是4的倍数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值