summaryrefslogtreecommitdiff
path: root/include/tinyff/image/generic.h
blob: a0bba62101160768b3cee3b7dda08b915b298910 (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
25
26
27
28
29
30
31
// This is the generics image header file for tinyff
// It contains generic image structures and definitions

#include <tinyff/common.h>
#include <tinyff/result.h>

#ifndef GENERIC_IMAGE_H
#define GENERIC_IMAGE_H


// The image origin is **not** the origin point of the image
// But rather from what the image was loaded

typedef enum {
    FF_IMAGE_ORIGIN_PNG,
    FF_IMAGE_ORIGIN_BMP
} ff_image_origin;

// Only the basic information about an image
// Warning: Data is RGBA8888 using scanlines going from top to bottom
typedef struct {
    uint32_t width;
    uint32_t height;
    ff_image_origin origin;

    uint8_t* data;

} ff_image_ctx;


#endif