nuclear@0: #ifndef IMAGE_H_ nuclear@0: #define IMAGE_H_ nuclear@0: nuclear@0: class Image { nuclear@0: private: nuclear@0: int width, height; nuclear@0: unsigned char *pixels; nuclear@0: bool own_pixels; nuclear@0: nuclear@0: public: nuclear@0: Image(); nuclear@0: ~Image(); nuclear@0: nuclear@0: Image(const Image &img); nuclear@0: Image &operator =(const Image &img); nuclear@0: nuclear@0: void create(int xsz, int ysz, unsigned char *pix = 0); nuclear@0: void destroy(); nuclear@0: nuclear@0: int get_width() const; nuclear@0: int get_height() const; nuclear@0: nuclear@0: void set_pixels(int xsz, int ysz, unsigned char *pix); nuclear@0: unsigned char *get_pixels() const; nuclear@0: nuclear@0: bool load(const char *fname); nuclear@0: }; nuclear@0: nuclear@0: #endif // IMAGE_H_