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

pljpegdec.h

Go to the documentation of this file.
00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: pljpegdec.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_PLJPEGDEC
00012 #define INCL_PLJPEGDEC
00013 
00014 #ifndef INCL_PLPICDEC
00015 #include "plpicdec.h"
00016 #endif
00017 
00018 #include <stdio.h>
00019 
00020 extern "C"
00021 {
00022 #include "jpeglib.h"
00023 }
00024 
00027 class PLJPEGDecoder : public PLPicDecoder
00028 {
00029 
00030 
00031 public:
00033   PLJPEGDecoder
00034     ();
00035 
00037   ~PLJPEGDecoder
00038     ();
00039 
00040 /* I used this function to test the IJPEG rouines without a custom
00041    data source. If something goes wrong, it may still be useful to
00042    isolate bugs.
00043   PLBmp * MakeBmpFromFile
00044     ( char * pszFName
00045     );
00046 */
00047 
00049   void SetFast
00050     ( bool bFast
00051     );
00052 
00053   // Jo Hagelberg 15.4.99
00054   // this must be static as it's passed to extern C
00056   static void JNotification
00057     (j_common_ptr cinfo
00058     );
00059 
00060 protected:
00063   void DoDecode
00064     ( PLBmp * pBmp,
00065       PLDataSource * pDataSrc
00066     );
00067 
00068 private:
00069   // Assumes IJPEG decoder is already set up.
00070   void decodeGray
00071     ( PLBmp * pBmp,
00072       int w,
00073       int h
00074     );
00075 
00076   // Assumes IJPEG decoder is already set up.
00077   void decodeRGB
00078     ( PLBmp * pBmp,
00079       int w,
00080       int h
00081     );
00082 
00083   jpeg_decompress_struct cinfo;  // IJPEG decoder state.
00084   jpeg_error_mgr         jerr;   // Custom error manager.
00085 
00086   bool  m_bFast;  // true selects fast but sloppy decoding.
00087 };
00088 
00089 #endif
00090 /*
00091 /--------------------------------------------------------------------
00092 |
00093 |      $Log: pljpegdec.h,v $
00094 |      Revision 1.1  2004/05/21 21:02:52  maxx
00095 |      Initial Version of vuVolume, moderatly changed to make it compile on my windows and linux machine.
00096 |
00097 |      Revision 1.1  2002/11/13 01:58:21  mspindle
00098 |      *** empty log message ***
00099 |
00100 |      Revision 1.2  2001/10/21 17:12:40  uzadow
00101 |      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.
00102 |
00103 |      Revision 1.1  2001/09/16 19:03:22  uzadow
00104 |      Added global name prefix PL, changed most filenames.
00105 |
00106 |      Revision 1.8  2001/09/15 21:02:44  uzadow
00107 |      Cleaned up stdpch.h and config.h to make them internal headers.
00108 |
00109 |      Revision 1.7  2000/12/18 22:42:52  uzadow
00110 |      Replaced RGBAPIXEL with PLPixel32.
00111 |
00112 |      Revision 1.6  2000/01/16 20:43:13  anonymous
00113 |      Removed MFC dependencies
00114 |
00115 |      Revision 1.5  1999/12/08 15:39:45  Ulrich von Zadow
00116 |      Unix compatibility changes
00117 |
00118 |      Revision 1.4  1999/11/27 18:45:48  Ulrich von Zadow
00119 |      Added/Updated doc comments.
00120 |
00121 |
00122 \--------------------------------------------------------------------
00123 */

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