diff options
author | Marvin Borner | 2021-03-26 21:55:50 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-26 22:02:20 +0100 |
commit | 05498860e8f7b1e8bb27880bc7526de026694804 (patch) | |
tree | 3bddf16e9439a950a3810d45e42a5cefdbcb7663 /libs/libgui/bmp.h | |
parent | a96e9c4c858d47f61b89d879aa0ce6a02bdacb38 (diff) |
Renamed libs
Cleaner and more flexible.
Diffstat (limited to 'libs/libgui/bmp.h')
-rw-r--r-- | libs/libgui/bmp.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libs/libgui/bmp.h b/libs/libgui/bmp.h new file mode 100644 index 0000000..ff8360b --- /dev/null +++ b/libs/libgui/bmp.h @@ -0,0 +1,39 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef BMP_H +#define BMP_H + +#include <def.h> +#include <vec.h> + +struct bmp_header { + u8 signature[2]; + u32 size; + u32 reserved; + u32 offset; +} __attribute__((packed)); + +struct bmp_info { + u32 size; + u32 width; + u32 height; + u16 planes; + u16 bpp; + u32 compression; + u32 compressed_size; + u32 x_pixel_meter; + u32 y_pixel_meter; + u32 colors; + u32 important_colors; +}; + +struct bmp { + vec2 size; + u8 *data; + u32 bpp; + u32 pitch; +}; + +struct bmp *bmp_load(const char *path); + +#endif |