3个回答
2012-04-30
展开全部
没有标准函数读。
需要根据BMP文件的结构定义,读出头部和每个颜色值。
struct header
{
unsigned short int bfType;
unsigned int bfSize;
unsigned short int bfReserved1;
unsigned short int bfReserved2;
unsigned int bfoffBits;
}__attribute__ ((packed));
struct tinfoheader
{
unsigned int biSize;
unsigned int biWidth;
unsigned int biHeight;
unsigned short int biPlanes;
unsigned short int biBitCount;
unsigned int biCompression;
unsigned int biSizeImage;
unsigned int biXPelsPerMeter;
unsigned int biYPelsPerMeter;
unsigned int biClrUsed;
unsigned int biClrImportant;
}__attribute__ ((packed));
需要根据BMP文件的结构定义,读出头部和每个颜色值。
struct header
{
unsigned short int bfType;
unsigned int bfSize;
unsigned short int bfReserved1;
unsigned short int bfReserved2;
unsigned int bfoffBits;
}__attribute__ ((packed));
struct tinfoheader
{
unsigned int biSize;
unsigned int biWidth;
unsigned int biHeight;
unsigned short int biPlanes;
unsigned short int biBitCount;
unsigned int biCompression;
unsigned int biSizeImage;
unsigned int biXPelsPerMeter;
unsigned int biYPelsPerMeter;
unsigned int biClrUsed;
unsigned int biClrImportant;
}__attribute__ ((packed));
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以调用系统消息处理函数
追问
能说的更详细点吗?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
读它像素点的值是吗?
追问
是的,我用画图工具画了一幅黑白的二值图像,保存格式是bmp的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询