diff options
| author | Mistivia <i@mistivia.com> | 2025-06-10 02:42:44 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-10 02:42:44 +0800 |
| commit | 07f3a1a5751e141c414d77e57c0e631feb441ef3 (patch) | |
| tree | 9d15ef0ec323ce91972463fd7730f2543ca917a6 /src/picture.h | |
| parent | c65dc6eab16410deb741797918df58348d7a0d04 (diff) | |
restructure
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 + |
