17 #ifndef IDENTICONPP_HPP 18 #define IDENTICONPP_HPP 24 #include <Magick++/Image.h> 45 friend class Testiconpp;
79 explicit Identiconpp(
const uint8_t columns,
const uint8_t rows,
81 const string &background =
"ffffffff",
82 const vector<string> &foreground = {
"000000ff" },
83 const array<uint8_t, 2> &padding = { 0, 0 });
95 Magick::Image
generate(
const string &digest,
const uint16_t width = 100);
108 const string generate_base64(
const string &magick,
const string &digest,
109 const uint16_t width = 100);
113 const uint8_t _columns;
115 const string _background;
116 const vector<string> _foreground;
117 const array<uint8_t, 2> _padding;
132 Magick::Image generate_ltr_symmetric(
const string &digest);
147 Magick::Image generate_ltr_asymmetric(
const string &digest);
162 Magick::Image generate_sigil(
const string &digest);
174 void check_entropy(
const string &digest,
algorithm type);
186 bool get_bit(
const uint16_t bit,
const string &digest);
200 Magick::Color get_color(
const uint16_t firstbit,
const string &digest);
211 static bool not_hex(
const char c);
220 void check_color(
const string &color);
223 #endif // IDENTICONPP_HPP algorithm
List of identicon algorithms.
Definition: identiconpp.hpp:49
Magick::Image generate(const string &digest, const uint16_t width=100)
Generates identicon from digest.
Definition: identiconpp.cpp:53
Base class for identiconpp.
Definition: identiconpp.hpp:42
Generates symmetric (vertically mirrored) identicons.
Identiconpp(const uint8_t columns, const uint8_t rows, algorithm type=algorithm::ltr_symmetric, const string &background="ffffffff", const vector< string > &foreground={ "000000ff" }, const array< uint8_t, 2 > &padding={ 0, 0 })
Initialises an instance of Identiconpp.
Definition: identiconpp.cpp:25
Generates asymmetric identicons.
const string generate_base64(const string &magick, const string &digest, const uint16_t width=100)
Generates identicon from digest.
Definition: identiconpp.cpp:99