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

plppmdec.h

Go to the documentation of this file.
00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plppmdec.h,v 1.1 2004/05/21 21:02:53 maxx Exp $
00005 |
00006 |      Copyright (c) 2001 Ulrich von Zadow
00007 |
00008 |      Portable Pixmap Decoder Class
00009 |
00010 |      Originally by Todd Harris - Mar 2001
00011 |      adadapted from pgm.h originally by
00012 |                        Jose Miguel Buenaposada Biencinto. Mar 2000.
00013 |
00014 \--------------------------------------------------------------------
00015 */
00016 
00017 #ifndef INCL_PLPPMDEC
00018 #define INCL_PLPPMDEC
00019 
00020 #ifndef INCL_PLPICDEC
00021 #include "plpicdec.h"
00022 #endif
00023 
00024 #ifndef INCL_PLPPM
00025 #include "plppm.h"
00026 #endif
00027 
00029 class PLPPMDecoder : public PLPicDecoder
00030 {
00031 
00032 public:
00034   PLPPMDecoder
00035     ();
00036 
00038   virtual ~PLPPMDecoder
00039     ();
00040 
00041 protected:
00044   virtual void DoDecode
00045     ( PLBmp * pBmp,
00046       PLDataSource * pDataSrc
00047     );
00048 
00049 private:
00050 
00051   void readPpmHeader (PPMHEADER *pPpmHead,
00052                             PLDataSource * pDataSrc);
00053 
00054   int  readASCIIDecimal(PLDataSource * pDataSrc);
00055 
00056   void skipComment(PLDataSource * pDataSrc);
00057 
00058   void skipPpmASCIISeparators(PLDataSource * pDataSrc);
00059 
00060   PLBYTE *readASCIILine(PLDataSource *pDataSrc);
00061 
00062   void readImage (PPMHEADER * pPpmHead,
00063                   PLBmp * pBmp,
00064                   PLDataSource * pDataSrc);
00065 
00066   void readData(PPMHEADER * pPpmHead,
00067                 PLBmp * pBmp,
00068                 PLDataSource * pDataSrc);
00069 
00070   void expandASCIILine
00071     ( PLPixel32 * pDest,
00072       int MaxGrayValue,
00073       int Width,
00074       PLDataSource * pDataSrc
00075     );
00076 
00077   void expandByteLine
00078     ( PLPixel32 * pDest,
00079             int MaxGrayValue,
00080             int Width,
00081       PLDataSource * pDataSrc
00082     );
00083 
00084 
00085   PLPixel32 PLPPMDecoder::readASCIIPixel32
00086     ( int MaxGrayValue,
00087       PLDataSource * pDataSrc
00088     );
00089 
00090   PLBYTE m_LastByte;
00091   bool m_UseLastByte;
00092 };
00093 
00094 #endif
00095 
00096 /*
00097 /--------------------------------------------------------------------
00098 |
00099 |      $Log: plppmdec.h,v $
00100 |      Revision 1.1  2004/05/21 21:02:53  maxx
00101 |      Initial Version of vuVolume, moderatly changed to make it compile on my windows and linux machine.
00102 |
00103 |      Revision 1.1  2002/11/13 01:58:22  mspindle
00104 |      *** empty log message ***
00105 |
00106 |      Revision 1.2  2001/10/21 17:12:40  uzadow
00107 |      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.
00108 |
00109 |      Revision 1.1  2001/10/16 17:51:32  uzadow
00110 |      Added ppm support (Todd Harris)
00111 |
00112 |
00113 \--------------------------------------------------------------------
00114 */

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