Dib.h
资源名称:08.zip [点击查看]
上传用户:ynjin1970
上传日期:2014-10-13
资源大小:6438k
文件大小:1k
源码类别:
中间件编程
开发平台:
Visual C++
- // Dib.h: interface for the CDib class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DIB_H__2D8EBEA6_A696_47F5_A473_F28E50A272AD__INCLUDED_)
- #define AFX_DIB_H__2D8EBEA6_A696_47F5_A473_F28E50A272AD__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CDib : public CObject
- {
- public:
- CDib();
- virtual ~CDib();
- public:
- HANDLE GetDIBHandle();
- long GetImageWidth();
- long GetImageHeight();
- int GetDIBColorsNum(BITMAPINFOHEADER* bmInfoHeader);
- void ReadDIBFile(LPTSTR lpFilename);
- void LoadDIB(LPTSTR lpFilename);
- void ClearMemory();
- HPALETTE CreateDIBPalette();
- BOOL PaintDIB(HDC hDC,long width,long height);
- void OnHistogramEqualize();
- BOOL OnChangeToGray();
- BOOL OnGrayStretch(BYTE x1,BYTE x2,BYTE y1,BYTE y2);
- BOOL OnChangeBrightness(float fa,float fb);
- protected:
- long m_Width;//图像宽度
- long m_Height;//图像高度
- BITMAPINFOHEADER* bmInfoHeader;//图像信息头
- HANDLE hDIB;
- public:
- BITMAPINFO* bmpInfo;
- BYTE* lpDIBBits;//图像数据指针
- };
- #endif // !defined(AFX_DIB_H__2D8EBEA6_A696_47F5_A473_F28E50A272AD__INCLUDED_)