如何确定BMP图像的颜色深度和每个像素的位数? [英] How might I determine the color depth and number of bits per pixel in a BMP image?

查看:1663
本文介绍了如何确定BMP图像的颜色深度和每个像素的位数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须调用哪种神奇的方法来确定BMP图像的每个像素中有多少位,并确定其颜色代码格式(是灰度图像还是RGB图像)?

What manner of arcane magic must I invoke to determine how many bits are in each pixel of a BMP image, and also divine its color code format (whether it is a gray-scale image or an RGB image)?

推荐答案

位图像素的大小可以在1到32位之间变化.位图文件可以是灰度或彩色的,并且可以使用多种编码来获取颜色信息.查阅此Wikipedia文章以了解更多详细信息:

http://en.wikipedia.org/wiki/BMP_file_format [
Bitmap pixels can vary in size from 1 to 32 bits. Bitmap files can be grayscale or color and use several kinds of encoding for color information. Check out this Wikipedia article for more details:

http://en.wikipedia.org/wiki/BMP_file_format[^]


这篇关于如何确定BMP图像的颜色深度和每个像素的位数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆