home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / win32 / include / cximage / ximawbmp.h < prev    next >
C/C++ Source or Header  |  2004-02-29  |  2KB  |  61 lines

  1. /*
  2.  * File:    ximawbmp.h
  3.  * Purpose:    WBMP Image Class Loader and Writer
  4.  */
  5. /* === C R E D I T S  &  D I S C L A I M E R S ==============
  6.  * CxImageWBMP (c) 12/Jul/2002 Davide Pizzolato - www.xdp.it
  7.  * Permission is given by the author to freely redistribute and include
  8.  * this code in any program as long as this credit is given where due.
  9.  *
  10.  * CxImage version 5.99a 08/Feb/2004
  11.  * See the file history.htm for the complete bugfix and news report.
  12.  *
  13.  * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
  14.  * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
  15.  * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
  16.  * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
  17.  * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
  18.  * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
  19.  * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
  20.  * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  21.  * THIS DISCLAIMER.
  22.  *
  23.  * Use at your own risk!
  24.  * ==========================================================
  25.  */
  26. #if !defined(__ximaWBMP_h)
  27. #define __ximaWBMP_h
  28.  
  29. #include "ximage.h"
  30.  
  31. #if CXIMAGE_SUPPORT_WBMP
  32.  
  33. class CxImageWBMP: public CxImage
  34. {
  35. #pragma pack(1)
  36. typedef struct tagWbmpHeader
  37. {
  38.     BYTE   Type;            // 0
  39.     BYTE   FixHeader;       // 0
  40.     BYTE   ImageWidth;      // Image Width
  41.     BYTE   ImageHeight;     // Image Height
  42. } WBMPHEADER;
  43. #pragma pack()
  44. public:
  45.     CxImageWBMP(): CxImage(CXIMAGE_FORMAT_WBMP) {}
  46.  
  47. //    bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_WBMP);}
  48. //    bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_WBMP);}
  49.     bool Decode(CxFile * hFile);
  50.     bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
  51.  
  52. #if CXIMAGE_SUPPORT_ENCODE
  53.     bool Encode(CxFile * hFile);
  54.     bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
  55. #endif // CXIMAGE_SUPPORT_ENCODE
  56. };
  57.  
  58. #endif
  59.  
  60. #endif
  61.