// $Revision: 1.5 $ #ifndef Taligent_DECODEXBM #define Taligent_DECODEXBM //----------------------------------------------------------------------------- // // Copyright (C) 1995 Taligent, Inc. All rights reserved. // // Project: WebRunner Sample // File: DecodeXBM.h // Build/Version: 1.0.0 // //----------------------------------------------------------------------------- #ifndef Taligent_PRIMITIVETYPES #include #endif #ifndef Taligent_GRAPHICIMAGE #include #endif //============================================================================= // TXBMDecoder class TXBMDecoder { public: TXBMDecoder(TStream& inputStream); ~TXBMDecoder(); TModifiableImage* OrphanImage(); protected: typedef unsigned char XBMCode; void ParseHeader(); void ParseBody(); unsigned char GetNextByte(); XBMCode ReadOneCode(); unsigned short GetImageSize(); static void ThrowBadData(const char* reason); private: TStream* fStream; TModifiableImage* fImage; unsigned short fImageWidth; unsigned short fImageHeight; }; #endif