00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: pliff85dec_8h-source.html,v 1.1 2004/06/06 12:56:41 uzadow Exp $ 00005 | Electronic Arts IFF 85 Decoder Class 00006 | 00007 | REFERENCES : 00008 | Jerry Morrison, Electronic Arts; "EA IFF 85" Standard for 00009 | Interchange Format Files; January 14, 1985 00010 | Available from http://www.wotsit.org as iff.zip 00011 | 00012 | Jerry Morrison, Electronic Arts; "ILBM" IFF Interleaved Bitmap; 00013 | January 17, 1986 00014 | Available from http://www.wotsit.org as ilbm.zip 00015 | 00016 | Rupert Welch (rafw@mindless.com) - December 2003 00017 | 00018 | Copyright (c) 2003-2004 Ulrich von Zadow 00019 | 00020 \-------------------------------------------------------------------- 00021 */ 00022 00023 #if !defined(INCL_PLIFF85DEC) 00024 #define INCL_PLIFF85DEC 00025 00026 #if !defined(INCL_PLPICDEC) 00027 #include "plpicdec.h" 00028 #endif 00029 00030 #include "pliff85.h" 00031 00032 //! EA IFF-85 ILBM/PBM decoder. Will decode a single-image file. 00033 class PLIFF85Decoder : public PLPicDecoder 00034 { 00035 00036 public: 00037 //! Creates a decoder 00038 PLIFF85Decoder 00039 (); 00040 00041 //! Destroys a decoder 00042 virtual ~PLIFF85Decoder 00043 (); 00044 00045 //! Opens the data source and extracts image properties. 00046 virtual void Open(PLDataSource * pDataSrc); 00047 00048 //! Fills the bitmap with the image. 00049 virtual void GetImage(PLBmp & Bmp); 00050 00051 private: 00052 void readChunkHeader(PLIFF85::Chunk& chunk, PLDataSource * pDataSrc); 00053 void readCompressedRow(PLBYTE * pRow, PLDataSource * pDataSrc, int numBytes); 00054 void readUncompressedRow(PLBYTE * pRow, PLDataSource * pDataSrc, int numBytes); 00055 int getBytesPerRow() const; 00056 00057 PLIFF85::ID m_formType; 00058 PLIFF85::BitMapHeader m_bitmapHeader; 00059 PLPixel32 m_pal[256]; 00060 PLIFF85::Viewmode m_viewMode; 00061 }; 00062 00063 #endif // !defined(INCL_PLIFF85DEC) 00064 00065 /* 00066 /-------------------------------------------------------------------- 00067 | 00068 | $Log: pliff85dec_8h-source.html,v $ 00068 | Revision 1.1 2004/06/06 12:56:41 uzadow 00068 | Doxygenified documentation. 00068 | 00069 | Revision 1.1 2004/03/13 19:40:23 uzadow 00070 | Added Rupert Welchs iff decoder. 00071 | 00072 | 00073 \-------------------------------------------------------------------- 00074 */