ht,sizeof(int),1,fp);Р?fwrite(&header.ysWidth,sizeof(int),1,fp);Р?for(i=0;i<HEIGHT;i++)Р for(j=0;j<WIDTH;j++)Р {Р temp1=b[i][j];Р for(m=j%8;m>0;m--)Р {Р temp1*=2;Р }Р temp+=temp1;Р n++;Р if(n==8)Р {Р fwrite(&temp,sizeof(BYTE),1,fp);Р cnt++;Р temp=0;Р n=0;Р }?Р }Р?for(i=0;i<_temp;i++)Р?{Р fwrite(&A[i],sizeof(BYTE),1,fp);Р cnt1++;Р?}Р?C=1.0*WIDTH*HEIGHT/(WIDTH*HEIGHT/8+WIDTH*HEIGHT/(yssize*yssize)*2);Р?printf("压缩比C为:%4f\n",C);Р?Р}Рvoid SaveDataFile(FILE * fp)Р{Р?int i,j;Р?int temp=t=0,sum=0;Р?for(i=0;i<WIDTH;i++)Р for(j=0;j<HEIGHT;j++)Р {Р fputc(b[i][j],fp);Р }Р?fclose(fp);Р}Рvoid CreatePalette(RGBQUAD pal[])Р{Р?int i;Р?for(i=0;i<256;i++)Р?{Р pal[i].rgbBlue=i;Р pal[i].rgbGreen=i;Р pal[i].rgbRed=i;Р pal[i].rgbReserved=0;Р?}Р?Р}Рvoid SaveBmpFile(FILE * fp)Р{Р?Р?int i,j;Р?BITMAPFILEHEADER bmfh;