Euphoria
image_to_text.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 
5 
6 #include "core/table.h"
7 #include "base/rgb.h"
8 
9 #include "core/imagefilters.h"
10 
11 
12 namespace eu::core
13 {
14  struct Image;
15 
16 
18  {
19  char to;
21  };
22 
23 
24  // todo(Gustav): add dithering support
27  (
28  const Image& img,
29  const std::vector<ImageMapAction>& map
30  );
31 
32 
35  (
36  const Image& img,
37  const std::vector<ImageMapAction>& map, char missing
38  );
39 
40 
42  from_image_to_string_table(const Image& img, bool shorter, Grayscale grayscale = Grayscale::r);
43 
44 
45  std::vector<std::string>
46  to_strings(const Table<char>& t);
47 
48 
49  // todo(Gustav): add function to print image using colored unicode blocks
50 }
std::vector< std::string > to_strings(const Table< char > &table)
Table< char > from_image_to_string_table_exact(const Image &img, const std::vector< ImageMapAction > &map, char missing)
Table< char > from_image_to_string_table(const Image &img, const std::vector< ImageMapAction > &map)
std::vector< T > map(const std::vector< F > &fs, C convert)
Definition: functional.h:56
Definition: rgb.h:26