-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageConverter.h
34 lines (29 loc) · 1009 Bytes
/
ImageConverter.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
#ifndef IMAGECONVERTER_H
#define IMAGECONVERTER_H
#include <cstdlib>
#include <string>
#include <map>
#define mwidth 100
#define maxstring 210
#define maxColorValue 255
class ImageConverter
{
private:
char charSet[90] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '_',
'+', '=', '{', '[', '}', ']', ':', ';', '<', ',', '>', '.', '~', '`', '?', '/'};
char intToCharMap[maxColorValue];
int col[3][100];
std::map<char,int> charmap;
public:
ImageConverter();
std::string stringBuffer[mwidth] = {};
int size_stringBuffer = 0;
int imageMatrix[3][mwidth][mwidth];
void mapCharToValue();
void stringsToImage(std::string msg);
void imageToString(int image[3][mwidth][mwidth]);
};
#endif //IMAGECONVERTER_H