Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

planydec.h

00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: planydec.h,v 1.9 2004/03/13 19:40:23 uzadow Exp $
00005 |
00006 |      Copyright (c) 1996-2002 Ulrich von Zadow
00007 |
00008 \--------------------------------------------------------------------
00009 */
00010 
00011 #ifndef INCL_PLANYDEC
00012 #define INCL_PLANYDEC
00013 
00014 #ifndef INCL_PLPICDEC
00015 #include "plpicdec.h"
00016 #endif
00017 
00018 class CBitmap;
00019 
00020 class PLPictDecoder;
00021 class PLTGADecoder;
00022 class PLTIFFDecoder;
00023 class PLJPEGDecoder;
00024 class PLPNGDecoder;
00025 class PLWEMFDecoder;
00026 class PLPCXDecoder;
00027 class PLPGMDecoder;
00028 class PLGIFDecoder;
00029 class PLBmpDecoder;
00030 class PLPPMDecoder;
00031 class PLPSDDecoder;
00032 class PLSGIDecoder;
00033 class PLIFF85Decoder;
00034 
00035 #define PL_FT_UNKNOWN 0
00036 #define PL_FT_WINBMP  1
00037 #define PL_FT_MACPICT 2
00038 #define PL_FT_TARGA   3
00039 #define PL_FT_TIFF    4
00040 #define PL_FT_JPEG    5
00041 #define PL_FT_PNG     6
00042 #define PL_FT_EPSTIFF 7
00043 #define PL_FT_WMF     8
00044 #define PL_FT_EMF     9
00045 #define PL_FT_PCX    10
00046 #define PL_FT_PGM    11
00047 #define PL_FT_GIF    12
00048 #define PL_FT_PPM    13
00049 #define PL_FT_PSD    14
00050 #define PL_FT_SGI    15
00051 #define PL_FT_IFF85  16
00052 
00053 //! Class which decodes pictures with any known format. 
00054 //! It auto-detects the format to use and delegates the work to one of
00055 //! the other decoder classes.
00056 //! The interface to PLAnyPicDecoder is the same as PLPicDecoder.
00057 class PLAnyPicDecoder : public PLPicDecoder
00058 {
00059 
00060 public:
00061   //! Creates a decoder.
00062   PLAnyPicDecoder
00063     ();
00064 
00065   //! Destroys the decoder.
00066   ~PLAnyPicDecoder
00067     ();
00068 
00069   //! Returns the actual file type loaded. Can be called after open. 
00070   int GetFileFormat ();
00071 
00072   //! Opens a data source and prepares decoding.
00073   virtual void Open (PLDataSource * pDataSrc);
00074 
00075   //! Decodes the actual image
00076   virtual void GetImage (PLBmp & Bmp);
00077 
00078   //! Terminates decoding.
00079   virtual void Close ();
00080 
00081 private:
00082   // Check for file-format-specific data & return the file type if
00083   // something fits.
00084   int getFileType
00085     ( PLBYTE * pData,
00086       int DataLen
00087     );
00088 
00089   long epsLongVal
00090     ( unsigned char *p
00091     );
00092 
00093   ///////////////////////////////////////////////////////////////////
00094   // Member variables.
00095   int m_Type;
00096   PLPicDecoder  * m_pCurDec;
00097 
00098   PLBmpDecoder  * m_pBmpDec;
00099   PLPictDecoder * m_pPictDec;
00100   PLTGADecoder  * m_pTGADec;
00101   PLTIFFDecoder * m_pTIFFDec;
00102   PLJPEGDecoder * m_pJPEGDec;
00103   PLPNGDecoder  * m_pPNGDec;
00104   PLWEMFDecoder * m_pWEMFDec;
00105   PLPCXDecoder  * m_pPCXDec;
00106   PLPGMDecoder  * m_pPGMDec;
00107   PLGIFDecoder  * m_pGIFDec;
00108   PLPPMDecoder  * m_pPPMDec;
00109   PLPSDDecoder  * m_pPSDDec;
00110   PLSGIDecoder  * m_pSGIDec;
00111   PLIFF85Decoder* m_pIFF85Dec;
00112 
00113 };
00114 
00115 #endif
00116 
00117 /*
00118 /--------------------------------------------------------------------
00119 |
00120 |      $Log: planydec.h,v $
00121 |      Revision 1.9  2004/03/13 19:40:23  uzadow
00122 |      Added Rupert Welchs iff decoder.
00123 |
00124 |      Revision 1.8  2003/06/01 21:12:06  uzadow
00125 |      Added sgi rgb file format.
00126 |
00127 |      Revision 1.7  2002/08/04 20:08:01  uzadow
00128 |      Added PLBmpInfo class, ability to extract metainformation from 
00129 |      images without loading the whole image and proper greyscale support.
00130 |
00131 |      Revision 1.6  2002/03/06 22:46:54  uzadow
00132 |      Fixed major PLAnyDec bug
00133 |
00134 |      Revision 1.5  2001/10/21 17:12:39  uzadow
00135 |      Added PSD decoder beta, removed BPPWanted from all decoders, added 
00136 |      PLFilterPixel.
00137 |
00138 |      Revision 1.4  2001/10/16 17:51:32  uzadow
00139 |      Added ppm support (Todd Harris)
00140 |
00141 |      Revision 1.3  2001/10/06 22:37:08  uzadow
00142 |      Linux compatibility.
00143 |
00144 |      Revision 1.2  2001/10/03 13:58:21  uzadow
00145 |      Removed references to config.h
00146 |
00147 |      Revision 1.1  2001/09/16 19:03:22  uzadow
00148 |      Added global name prefix PL, changed most filenames.
00149 |
00150 |      Revision 1.12  2001/09/15 21:02:44  uzadow
00151 |      Cleaned up stdpch.h and config.h to make them internal headers.
00152 |
00153 |      Revision 1.11  2001/01/14 13:36:15  uzadow
00154 |      Added PLAnyPicDecoder::GetFileFormat()
00155 |
00156 |      Revision 1.10  2000/12/08 12:32:00  uzadow
00157 |      Added gif decoder by Michael Salzlechner.
00158 |
00159 |      Revision 1.9  2000/03/31 11:53:29  Ulrich von Zadow
00160 |      Added quantization support.
00161 |
00162 |      Revision 1.8  2000/03/16 13:56:37  Ulrich von Zadow
00163 |      Added pgm decoder by Jose Miguel Buenaposada Biencinto
00164 |
00165 |      Revision 1.7  2000/01/16 20:43:12  anonymous
00166 |      Removed MFC dependencies
00167 |
00168 |      Revision 1.6  1999/12/08 15:39:45  Ulrich von Zadow
00169 |      Unix compatibility changes
00170 |
00171 |
00172 \--------------------------------------------------------------------
00173 */

Generated on Sun Jun 6 13:42:21 2004 for paintlib by doxygen 1.3.2