:: limine / common / lib / image.h 742 B raw

1
#ifndef LIB__IMAGE_H__
2
#define LIB__IMAGE_H__
3
4
#include <stdint.h>
5
#include <fs/file.h>
6
7
struct image {
8
    size_t x_size;
9
    size_t y_size;
10
    int type;
11
    uint8_t *img;
12
    int bpp;
13
    int pitch;
14
    size_t img_width; // x_size = scaled size, img_width = bitmap size
15
    size_t img_height;
16
    int64_t x_displacement;
17
    int64_t y_displacement;
18
    uint32_t back_colour;
19
    char isQoi;
20
};
21
22
enum {
23
    IMAGE_TILED, IMAGE_CENTERED, IMAGE_STRETCHED
24
};
25
26
void image_make_centered(struct image *image, int frame_x_size, int frame_y_size, uint32_t back_colour);
27
void image_make_stretched(struct image *image, int new_x_size, int new_y_size);
28
struct image *image_open(struct file_handle *file);
29
void image_close(struct image *image);
30
31
#endif
tab: 248 wrap: offon