資源簡介
動態規劃寫的灰度壓縮解壓,只適合bmp文件,包含壓縮和解壓
代碼片段和文件信息
//?灰度壓縮.cpp?:?定義控制臺應用程序的入口點。
//
#include?“stdafx.h“
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
typedef?struct?tagBITMAPFILEHEADER
{
int???bfSize;
short????bfReserved1;
short????bfReserved2;
int???bfOffBits;
}?BITMAPFILEHEADER;
typedef?struct?tagBITMAPINFOHEADER
{
int????biSize;
int???????biWidth;
int???????biHeight;
short???????biPlanes;
short???????biBitCount;
int??????biCompression;
int??????biSizeImage;
int???????biXPelsPerMeter;
int???????biYPelsPerMeter;
int??????biClrUsed;
int??????biClrImportant;
}BITMAPINFOHEADER;
class?CCompressImage
{
private:
string?filename;//文件名
int?LENGTH;//像素長
int?WEIGHT;//像素寬
string?toubu;//頭部
stri
- 上一篇:職工信息管理系統C語言
- 下一篇:基于DSP的積分分離的PID控制算法
評論
共有 條評論