diff options
Diffstat (limited to 'src/picture.h')
| -rw-r--r-- | src/picture.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/picture.h b/src/picture.h new file mode 100644 index 0000000..fec5d36 --- /dev/null +++ b/src/picture.h @@ -0,0 +1,24 @@ +#ifndef PICTURE_H_ +#define PICTURE_H_ + +#include <stdbool.h> + +#include "vecmath.h" + + +typedef struct { + int width; + int height; + float *buffer; +} Picture; + +Picture new_picture(int width, int height); +void delete_picture(Picture pic); + +void set_pixel(Picture pic, Vec2i pos, Color c); +void normalize_picture(Picture pic); + +bool writeBMP(const char* filename, Picture pic); + +#endif + |
