【文件属性】:
文件名称:创建位图文件
文件大小:2KB
文件格式:ZIP
更新时间:2016-09-24 07:33:21
创建位图文件
可用于创建位图文件
class CCreateBMP
{
public:
CCreateBMP(void);
CCreateBMP(int width,int height,int BKcolorvalue=128,int colortablelng=1024,int bitcount=8);
~CCreateBMP(void);
protected:
unsigned char *m_databuf;
unsigned char *m_imgbuf;
long long unsigned int m_imgbytes;
long long unsigned int m_BMPbytes;
int m_linebyte;
int m_width;
int m_height;
int m_bitcount;
LPBITMAPFILEHEADER m_pfileheader;
LPBITMAPINFOHEADER m_pinfoheader;
LPRGBQUAD m_ColorTable;
public:
bool CreateBitmap(int width,int height,int BKcolorvalue=128,int colortablelng=1024,int bitcount=8);
bool SaveBitmap(LPCTSTR lpszfilename=NULL);
unsigned char *GetImgBuf() const;
unsigned char *GetDataBuf() const;
LPRGBQUAD GetColorTable() const;
LPBITMAPFILEHEADER GetFileHeader() const;
LPBITMAPINFOHEADER GetInfoHeader() const;
long long unsigned int GetImgBytes() const;
long long unsigned int GetBMPBytes() const;
CSize GetSize() const;
unsigned char GetBitCount() const;
long long unsigned int GetLineBytes() const;
};
【文件预览】:
CreateBitmap
----CreateBMP.h(1KB)
----CreateBMP.cpp(8KB)