⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bmp.h

📁 this program show how to get the value of every pixel,and you can modify it based on this case.
💻 H
字号:
// BMP.h: interface for the CBMP class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BMP_H__AF5BEF13_CC96_4084_BDFC_E5F40B629356__INCLUDED_)
#define AFX_BMP_H__AF5BEF13_CC96_4084_BDFC_E5F40B629356__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MAXWIDTH   1000  //图象最大宽高
#define MAXHEIGHT  800

class CBMP  
{
public:
	CBMP();
	virtual ~CBMP();

public:
	
	unsigned char *rgb;
	unsigned char *buf;
	int lHeight;    //图像高宽
	int lWidth;
	int  iBmpStyle;     //位图格式(多少位)
	BYTE pArray_R[MAXHEIGHT][MAXWIDTH];    //图像RGB数组
	BYTE pArray_G[MAXHEIGHT][MAXWIDTH];
	BYTE pArray_B[MAXHEIGHT][MAXWIDTH];

	bool bOpen;         //是否成功打开
	int OpenBMPFile(char *bmpFileName);
	modify_rgb(int startx,int starty,int endx,int endy,int step);

};

#endif // !defined(AFX_BMP_H__AF5BEF13_CC96_4084_BDFC_E5F40B629356__INCLUDED_)
//一函数能 平均固定区域的值
void rgb(int startx,int starty,int endx,int endy,int step,BYTE p[][MAXWIDTH]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -