图像处理的有用资料
short type; int bfSize; short re1,re2; int Offbits; };
//BMP信息头
struct BITMAPINFO_ {
long size;
long width,height; short planes,bitCount; long comp,sizeImg; long xpels,ypels; long used,important; };
//BMP彩色表项 struct COLOR_ {
char blue,green,red,re; };
//------将BMP彩色表的数据校正到BCB TColor的数据。 void SwitchColor(long &c) {
long blue=c& 0x000000ff; long green=c& 0x0000ff00; long red=c& 0x00ff0000;
c=(blue<<16) | green | (red>>16); }
void xxx() {
FILE *f=fopen("f:\\bbs_prev2.bmp","rb");
if(f==NULL) /*判断文件是否打开成功*/ {
ShowMessage("File open error"); return; }
fseek(f,0,0);//移动到开头
//----------读BMP文件头
BITMAPFILEHEADER_ *bmph=new BITMAPFILEHEADER_();
if(fread((char*)bmph,sizeof(BITMAPFILEHEADER_),1,f)==NULL) {