Dib.h
资源名称:图像处理毕业设计.rar [点击查看]
上传用户:yuzhuan
上传日期:2013-03-16
资源大小:3596k
文件大小:1k
源码类别:
2D图形编程
开发平台:
Visual C++
- // Dib.h: interface for the Dib class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DIB_H__64E5CC0D_2667_4DB9_B914_04C93223B755__INCLUDED_)
- #define AFX_DIB_H__64E5CC0D_2667_4DB9_B914_04C93223B755__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- /*#ifndef ___CDib_H
- #define ___CDib_H*/
- class CDib :public CObject
- {
- public:
- RGBQUAD *m_pRGB;
- BYTE *m_pData;//图像数据
- UINT m_numberOfColors;//图像实际使用的颜色表中的颜色数
- BOOL m_valid;
- BITMAPFILEHEADER bitmapFileHeader;
- BITMAPINFOHEADER *m_pBitmapInfoHeader;
- BITMAPINFO *m_pBitmapInfo;
- BYTE *pDib;
- DWORD size;
- CPalette hPalette;
- public:
- CDib();
- ~CDib();
- char m_fileName[256];
- char *GetFileName();
- BOOL IsValid();
- DWORD GetSize();
- UINT GetWidth();
- UINT GetHeight();
- UINT GetNumberOfColors();
- RGBQUAD *GetRGB();
- BYTE *GetData();
- BITMAPINFO *GetInfo();
- WORD PaletteSize(LPBYTE lpDIB);
- WORD DIBNumColors(LPBYTE lpDIB);
- void Sub(LPBYTE p_data, LPBYTE p_dataBK,int wide,int height);
- void SaveFile(const CString filename);
- CPalette *CreateBmpPalette();
- public:
- void LoadFile(const CString dibFileName);
- };
- #endif // !defined(AFX_DIB_H__64E5CC0D_2667_4DB9_B914_04C93223B755__INCLUDED_)