volmetrics
diff src/image.h @ 0:88d390af583f
Image loader
author | Eleni Maria Stea <eleni@mutantstargoat.com> |
---|---|
date | Sat, 11 Jan 2014 17:22:36 +0200 |
parents | |
children | 1fbbe10c8e08 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/image.h Sat Jan 11 17:22:36 2014 +0200 1.3 @@ -0,0 +1,23 @@ 1.4 +#ifndef IMAGE_H_ 1.5 +#define IMAGE_H_ 1.6 + 1.7 +class Image { 1.8 +private: 1.9 + float *pixels; 1.10 + int width; 1.11 + int height; 1.12 +public: 1.13 + Image(); 1.14 + ~Image(); 1.15 + 1.16 + bool load(const char *fname); 1.17 + 1.18 + float *get_pixels(); 1.19 + const float *get_pixels() const; 1.20 + void set_pixels(const float *pixels, int width, int height); 1.21 + 1.22 + int get_width() const; 1.23 + int get_height() const; 1.24 +}; 1.25 + 1.26 +#endif //IMAGE_H_