00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: plpcxdec.h,v 1.6 2003/08/03 10:58:32 uzadow Exp $ 00005 | 00006 | Copyright (c) 1996-2002 Ulrich von Zadow 00007 | 00008 \-------------------------------------------------------------------- 00009 */ 00010 00011 #ifndef INCL_PLPCXDEC 00012 #define INCL_PLPCXDEC 00013 00014 #ifndef INCL_PLPICDEC 00015 #include "plpicdec.h" 00016 #endif 00017 00018 #include "plpcx.h" 00019 00020 //! PCX file decoder. Decodes 8, 15, 16, 24 and 32 bpp 00021 //! PCX files (compressed and uncompressed) and returns an 8 or 32 00022 //! bpp PLBmp. Preserves the alpha channel. 00023 class PLPCXDecoder : public PLPicDecoder 00024 { 00025 00026 public: 00027 //! Creates a decoder 00028 PLPCXDecoder(); 00029 00030 //! Destroys a decoder 00031 virtual ~PLPCXDecoder (); 00032 00033 virtual void Open (PLDataSource * pDataSrc); 00034 00035 //! Fills the bitmap with the image. 00036 virtual void GetImage (PLBmp & Bmp); 00037 00038 private: 00039 void PCX_PlanesToPixels(PLBYTE *pixels, PLBYTE *bitplanes, 00040 short bytesperline, short planes, short bitsperpixel); 00041 void PCX_UnpackPixels(PLBYTE *pixels, PLBYTE *bitplanes, 00042 short bytesperline, short planes, short bitsperpixel); 00043 00044 PCXHEADER m_PcxHeader; 00045 }; 00046 00047 #endif 00048 00049 /* 00050 /-------------------------------------------------------------------- 00051 | 00052 | $Log: plpcxdec.h,v $ 00053 | Revision 1.6 2003/08/03 10:58:32 uzadow 00054 | Windows port of PLFilterFlipRGB. Fixed PLPCXDecoder. 00055 | 00056 | Revision 1.5 2002/08/04 20:08:01 uzadow 00057 | Added PLBmpInfo class, ability to extract metainformation from images without loading the whole image and proper greyscale support. 00058 | 00059 | Revision 1.4 2002/03/31 13:36:42 uzadow 00060 | Updated copyright. 00061 | 00062 | Revision 1.3 2001/10/21 17:12:40 uzadow 00063 | Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel. 00064 | 00065 | Revision 1.2 2001/10/06 22:37:08 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.8 2000/12/18 22:42:52 uzadow 00072 | Replaced RGBAPIXEL with PLPixel32. 00073 | 00074 | Revision 1.7 2000/01/16 20:43:13 anonymous 00075 | Removed MFC dependencies 00076 | 00077 | Revision 1.6 2000/01/10 23:52:59 Ulrich von Zadow 00078 | Changed formatting & removed tabs. 00079 | 00080 | Revision 1.5 1999/12/15 21:16:30 Ulrich von Zadow 00081 | Removed references to gif in pcx decoder. 00082 | 00083 | Revision 1.4 1999/12/10 01:27:26 Ulrich von Zadow 00084 | Added assignment operator and copy constructor to 00085 | bitmap classes. 00086 | 00087 | Revision 1.3 1999/12/08 15:39:45 Ulrich von Zadow 00088 | Unix compatibility changes 00089 | 00090 | Revision 1.2 1999/11/27 18:45:48 Ulrich von Zadow 00091 | Added/Updated doc comments. 00092 | 00093 \-------------------------------------------------------------------- 00094 */