DIB.h 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // DIB.h
  2. #ifndef __DIB_H__
  3. #define __DIB_H__
  4. #include "MyImageWork.h"
  5. #include <complex>
  6. using namespace std;
  7. class CDib
  8. {
  9. public:
  10. CDib();
  11. ~CDib();
  12. BOOL Draw( CDC *pDC, int nX = -1, int nY = -1, int nWidth = -1, int nHeight = -1, int Style = 1);
  13. BOOL Save( const char *pszFilename );
  14. BOOL Load( const char * );
  15. // bool Valid;
  16. public:
  17. int m_BitCount;
  18. WORD * m_pWordData;
  19. CPalette m_Palette;
  20. unsigned char *m_pDib, *m_pDibBits;
  21. unsigned char *m_pOldDibShow;
  22. DWORD m_dwDibSize;
  23. BITMAPINFOHEADER *m_pBIH;
  24. RGBQUAD *m_pPalette;
  25. int m_nPaletteEntries;
  26. public:
  27. void BackUpDib();
  28. void Pick();
  29. void Embed();
  30. BOOL LoadEmbFile(const char *);
  31. BOOL DrawContrast(CDC *pDC,int rect_width, int rect_height);
  32. UINT bitmap_size;
  33. UINT embfile_size;
  34. unsigned char *p;//指向宿主图像数据
  35. int tag; //此tag用以标记打开的图像中是否含有隐藏信息0:无 else:有
  36. unsigned char *q;//指向隐藏文件数据
  37. unsigned char *m_pFile;
  38. void SavePicked( const char *pszFilename );
  39. };
  40. #endif