00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: plpngenc_8h-source.html,v 1.4 2004/09/15 15:26:32 uzadow Exp $ 00005 | 00006 | Copyright (c) 1996-2002 Ulrich von Zadow 00007 | 00008 \-------------------------------------------------------------------- 00009 */ 00010 00011 #ifndef INCL_PLPNGENC 00012 #define INCL_PLPNGENC 00013 00014 #ifndef INCL_PLPICENC 00015 #include "plpicenc.h" 00016 #endif 00017 00018 //! PNG file encoder. Uses LIBPNG to do the actual conversion. 00019 class PLPNGEncoder : public PLPicEncoder 00020 { 00021 00022 public: 00023 //! Creates an encoder 00024 PLPNGEncoder 00025 (); 00026 00027 //! Destroys a encoder 00028 virtual ~PLPNGEncoder 00029 (); 00030 00031 PLDataSink * GetDataSink 00032 (); 00033 00034 //! Sets compression level for PNG, range is 0-9, 9 is hardest compression 00035 void SetCompressionLevel(unsigned short Level); 00036 // Inserted by René Dencker Eriksen (edr@mip.sdu.dk) 00037 00038 protected: 00039 00040 //! Sets up LIBPNG environment and calls LIBPNG to encode an image. 00041 virtual void DoEncode 00042 ( PLBmpBase* pBmp, 00043 PLDataSink* pDataSnk 00044 ); 00045 00046 private: 00047 PLBmpBase * m_pBmp; 00048 PLDataSink* m_pDataSnk; 00049 unsigned short m_CompressionLevel; 00050 00051 }; 00052 00053 00054 #endif // INCL_PLPNGENC 00055 /* 00056 /-------------------------------------------------------------------- 00057 | 00058 | $Log: plpngenc_8h-source.html,v $ 00058 | Revision 1.4 2004/09/15 15:26:32 uzadow 00058 | Linux compatibility changes, doc update. 00058 | 00059 | Revision 1.6 2004/06/19 18:16:33 uzadow 00060 | Documentation update 00061 | 00062 | Revision 1.5 2004/06/06 12:56:38 uzadow 00063 | Doxygenified documentation. 00064 | 00065 | Revision 1.4 2002/11/18 14:45:00 uzadow 00066 | Added PNG compression support, fixed docs. 00067 | 00068 | Revision 1.3 2002/02/24 13:00:38 uzadow 00069 | Documentation update; removed buggy PLFilterRotate. 00070 | 00071 | Revision 1.2 2001/10/06 20:44:45 uzadow 00072 | Linux compatibility 00073 | 00074 | Revision 1.1 2001/09/16 19:03:22 uzadow 00075 | Added global name prefix PL, changed most filenames. 00076 | 00077 | Revision 1.3 2000/01/16 20:43:14 anonymous 00078 | Removed MFC dependencies 00079 | 00080 | Revision 1.2 2000/01/08 15:53:12 Ulrich von Zadow 00081 | Moved several functions to the cpp file so applications don't 00082 | need the png directory in the include path. 00083 | 00084 | Revision 1.1 2000/01/04 22:06:17 Ulrich von Zadow 00085 | Initial version by Neville Richards. 00086 | 00087 | 00088 \-------------------------------------------------------------------- 00089 */