00001 //------------------------------------------------------------------------------
00002 // DIBCLASS.H -- © Adam King, 2000
00003 //
00004 // Class to store and manage Device-Independent Bitmap (DIB) information
00005 //------------------------------------------------------------------------------
00006 #ifndef DIBCLASS_H
00007 #define DIBCLASS_H
00008
00009 #include <windows.h>
00010
00011 //------------------------------------------------------------------------------
00012 // The DIB class definition
00013 //------------------------------------------------------------------------------
00014 class _export DIB
00015 {
00016 LPBITMAPINFO lpDib; // Pointer to the Bitmap Information
00017
00018 public:
00019 DIB();
00020 ~DIB() { Clear(); }
00021
00022 // Clear all information from the DIB class, freeing any alocated memory
00023 void Clear();
00024
00025 // Utility function to extract the Header Size from the DIB memory block
00026 DWORD GetDibInfoHeaderSize(void);
00027
00028 // Utility function to extract the Width of the DIB
00029 DWORD GetDibWidth(void);
00030
00031 // Utility function to extract the Height of the DIB
00032 DWORD GetDibHeight(void);
00033
00034 // Utility function to provide external access to the Bitmap Information
00035 LPBITMAPINFO GetDib() { return lpDib; }
00036
00037 // Read a DIB from a file into memory
00038 LPBITMAPINFO ReadDib(LPCSTR szFileName);
00039 };
00040
00041 #endif
00042