-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.h
40 lines (25 loc) · 629 Bytes
/
Image.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
#include <vector>
#include <string>
#ifndef Bitmap_IMAGE_H
#define Bitmap_IMAGE_H
struct Color {
float r , g , b;
Color();
Color(float r , float g , float b);
~Color();
};
class Image {
public:
Image(int width , int height);
~Image();
Color GetColor(int x , int y) const;
void Export(const char *path) const;
void ExportHighContrast(const char *path) const;
void ExportWhite(const char *path) const;
void ExportRotate(const char *path) const;
void Read(std::string path);
private:
int mWidth , mHeight;
std::vector<Color> mColors;
};
#endif //Bitmap_IMAGE_H