-
Notifications
You must be signed in to change notification settings - Fork 0
/
base_types.h
43 lines (35 loc) · 838 Bytes
/
base_types.h
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
32
33
34
35
36
37
38
39
40
41
42
43
/* Developed by Jimmy Hu */
#ifndef TINYDIP_BASE_TYPES_H // base_types.h header guard, follow the suggestion from https://codereview.stackexchange.com/a/293832/231235
#define TINYDIP_BASE_TYPES_H
#include <cstdint>
#include <filesystem>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <utility>
namespace TinyDIP
{
struct RGB
{
std::uint8_t channels[3];
};
struct RGB_DOUBLE
{
double channels[3];
};
using GrayScale = std::uint8_t;
struct HSV
{
double channels[3]; // Range: 0 <= H < 360, 0 <= S <= 1, 0 <= V <= 255
};
struct BMPIMAGE
{
std::filesystem::path FILENAME;
unsigned int XSIZE;
unsigned int YSIZE;
std::uint8_t FILLINGBYTE;
std::uint8_t* IMAGE_DATA;
};
}
#endif