conworlds

view src/image.h @ 6:3c36bc28c6c2

more stuff in the vr test
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 21 Aug 2014 01:08:03 +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_