00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: plpngenc.h,v 1.4 2002/11/18 14:45:00 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 ( PLBmp* pBmp, 00043 PLDataSink* pDataSnk 00044 ); 00045 00046 private: 00047 PLBmp * 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.h,v $ 00059 | Revision 1.4 2002/11/18 14:45:00 uzadow 00060 | Added PNG compression support, fixed docs. 00061 | 00062 | Revision 1.3 2002/02/24 13:00:38 uzadow 00063 | Documentation update; removed buggy PLFilterRotate. 00064 | 00065 | Revision 1.2 2001/10/06 20:44:45 uzadow 00066 | Linux compatibility 00067 | 00068 | Revision 1.1 2001/09/16 19:03:22 uzadow 00069 | Added global name prefix PL, changed most filenames. 00070 | 00071 | Revision 1.3 2000/01/16 20:43:14 anonymous 00072 | Removed MFC dependencies 00073 | 00074 | Revision 1.2 2000/01/08 15:53:12 Ulrich von Zadow 00075 | Moved several functions to the cpp file so applications don't 00076 | need the png directory in the include path. 00077 | 00078 | Revision 1.1 2000/01/04 22:06:17 Ulrich von Zadow 00079 | Initial version by Neville Richards. 00080 | 00081 | 00082 \-------------------------------------------------------------------- 00083 */