vrchess
view src/image.h @ 10:e3f0ca1d008a
added preliminary OpenHMD module
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 22 Aug 2014 20:11:15 +0300 |
parents | b326d53321f7 |
children |
line source
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
4 class Image {
5 private:
6 int width, height;
7 unsigned char *pixels;
8 bool own_pixels;
10 public:
11 Image();
12 ~Image();
14 Image(const Image &img);
15 Image &operator =(const Image &img);
17 void create(int xsz, int ysz, unsigned char *pix = 0);
18 void destroy();
20 int get_width() const;
21 int get_height() const;
23 void set_pixels(int xsz, int ysz, unsigned char *pix);
24 unsigned char *get_pixels() const;
26 bool load(const char *fname);
27 };
29 #endif // IMAGE_H_