aboutsummaryrefslogtreecommitdiff
path: root/src/picture.h
blob: fec5d360691c8ac2080b13ff17de0461acc7b4bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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