#ifndef __IMAGE_H__ #define __IMAGE_H__ #include #include #include enum { FORMAT_TGA_BASIC, FORMAT_JPEG, }; class Image : public Buffer { public: Image(unsigned int width, unsigned int height); virtual ~Image(); Color GetPixel(unsigned int, unsigned int) const; unsigned char * GetBuffer(); void SetPixel(unsigned int, unsigned int, Color); bool Prepare(unsigned int = FORMAT_TGA_BASIC) throw (GeneralException); void Fill(Color = Color(0, 0, 0)); virtual String GetName() const; virtual bool CanWrite() const; private: unsigned int x, y; bool r; Color * img; }; #endif