Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

plbmpdec.h

Go to the documentation of this file.
00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plbmpdec.h,v 1.1 2004/05/21 21:02:52 maxx Exp $
00005 |
00006 |      Copyright (c) 1996-1998 Ulrich von Zadow
00007 |
00008 \--------------------------------------------------------------------
00009 */
00010 
00011 #ifndef INCL_PLBMPDEC
00012 #define INCL_PLBMPDEC
00013 
00014 #ifndef INCL_PLPICDEC
00015 #include "plpicdec.h"
00016 #endif
00017 
00018 #ifndef INCL_PLWINDEFS
00019 #include "plwindefs.h"
00020 #endif
00021 
00025 class PLBmpDecoder : public PLPicDecoder
00026 {
00027 
00028 public:
00030   PLBmpDecoder
00031     ();
00032 
00034   virtual ~PLBmpDecoder
00035     ();
00036 
00037 protected:
00039   virtual void DoDecode
00040     ( PLBmp * pBmp,
00041       PLDataSource * pDataSrc
00042     );
00043 
00044 private:
00045 
00046   // Decodes the bitmap file & info headers
00047   WINBITMAPINFOHEADER * getInfoHeader
00048     ( PLDataSource * pDataSrc,
00049       PLPixel32* Pal
00050     );
00051 
00052   // Decodes a 2-color bitmap. Ignores the palette & just uses
00053   // black & white as 'colors'
00054   void decode1bpp
00055     ( PLDataSource * pDataSrc,
00056       PLBmp * pBmp
00057     );
00058 
00059   // Decodes an uncompressed 16-color-bitmap.
00060   void decode4bpp
00061     ( PLDataSource * pDataSrc,
00062       PLBmp * pBmp
00063     );
00064 
00065   // Decodes an uncompressed 256-color-bitmap.
00066   void decode8bpp
00067     ( PLDataSource * pDataSrc,
00068       PLBmp * pBmp
00069     );
00070 
00071   // Decodes a compressed 16-color-bitmap.
00072   void decodeRLE4
00073     ( PLDataSource * pDataSrc,
00074       PLBmp * pBmp
00075     );
00076 
00077   // Decodes a compressed 256-color-bitmap.
00078   void decodeRLE8
00079     ( PLDataSource * pDataSrc,
00080       PLBmp * pBmp
00081     );
00082 
00083   void decodeHiColor
00084     ( PLDataSource * pDataSrc,
00085       PLBmp * pBmp,
00086       WINBITMAPINFOHEADER * pBMI
00087     );
00088 
00089   // Decodes true-color bitmap
00090   void decodeTrueColor
00091     ( PLDataSource * pDataSrc,
00092       PLBmp * pBmp,
00093       int SrcBPP
00094     );
00095 
00096   void decode15bppLine
00097     ( PLDataSource * pDataSrc,
00098       PLBmp * pBmp,
00099       PLBYTE * pDest
00100     );
00101 
00102   void decode16bppLine
00103     ( PLDataSource * pDataSrc,
00104       PLBmp * pBmp,
00105       PLBYTE * pDest
00106     );
00107 
00108   void decode24bppLine
00109     ( PLDataSource * pDataSrc,
00110       PLBmp * pBmp,
00111       PLBYTE * pDest
00112     );
00113 
00114   void decode32bppLine
00115     ( PLDataSource * pDataSrc,
00116       PLBmp * pBmp,
00117       PLBYTE * pDest
00118     );
00119 
00120 
00121   // Decodes two 4-bit pixels using a palette & puts them in pDest
00122   // and pDest+4.
00123   void decode2Nibbles
00124     ( PLBYTE * pDest,
00125       PLBYTE SrcByte
00126     );
00127 
00128   // Makes a private copy of the palette in the file and sets the
00129   // alpha channel. Returns the number of colors read.
00130   int readPalette
00131     ( WINBITMAPINFOHEADER * pBMI,     // Pointer to bitmapinfoheader in file.
00132       PLDataSource * pDataSrc,
00133       PLPixel32 * pPal,
00134       int RGBSize
00135     );
00136 
00137 };
00138 
00139 #endif
00140 /*
00141 /--------------------------------------------------------------------
00142 |
00143 |      $Log: plbmpdec.h,v $
00144 |      Revision 1.1  2004/05/21 21:02:52  maxx
00145 |      Initial Version of vuVolume, moderatly changed to make it compile on my windows and linux machine.
00146 |
00147 |      Revision 1.1  2002/11/13 01:58:20  mspindle
00148 |      *** empty log message ***
00149 |
00150 |      Revision 1.5  2001/10/21 17:12:39  uzadow
00151 |      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.
00152 |
00153 |      Revision 1.4  2001/10/06 22:37:08  uzadow
00154 |      Linux compatibility.
00155 |
00156 |      Revision 1.3  2001/10/06 20:44:45  uzadow
00157 |      Linux compatibility
00158 |
00159 |      Revision 1.2  2001/10/05 21:15:09  uzadow
00160 |      Improved support for OS/2 bitmap decoding.
00161 |
00162 |      Revision 1.1  2001/09/16 19:03:22  uzadow
00163 |      Added global name prefix PL, changed most filenames.
00164 |
00165 |
00166 \--------------------------------------------------------------------
00167 */

Generated on Wed Dec 15 21:20:30 2004 for vuVolume by  doxygen 1.3.9.1